-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Unable to configure error message strategy for JMS channel adapters and gateways #10046
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@Bean
public IntegrationFlow jmsMessageDrivenFlow(ConnectionFactory connectionFactory) {
return IntegrationFlow.from(
Jms.messageDrivenChannelAdapter(connectionFactory)
.errorMessageStrategy(new DefaultErrorMessageStrategy())
.destination(queue)
.id("observedJmsIntegrationQueue")
)
.handle(msg -> logger.info(msg))
.get();
} looks in my local no compilation error in Java DSL way. |
It was more the non-DSL java configuration I was referencing regarding the compilation error. However, does the DSL configuration actually work? I don't fully understand how the DSL configuration applies, but from what I can see it calls the setErrorMessageStrategy method on the JmsMessageDrivenEndpoint. Similarly, the JmsMessageDrivenEndpoint proxies all the get/set method to the internal listener (ChannelPublishingJmsMessageListener), except the setErrorMessageStrategy/getErrorMessageStrategy. So surely the error message strategy will just be set on JmsMessageDrivenEndpoint, which is ignored from a functionality point of view? |
thank you, I understand your point now. |
There cannot be a compilation error because of
However, I definitely see the problem.
Where that
Which is the central part to perform all the hard work. Your |
Fixes: #10046 Issue link: #10046 The `JmsMessageDrivenEndpoint` does not propagate an `ErrorMessageStrategy` down to the `ChannelPublishingJmsMessageListener.GatewayDelegate` * Expose `JmsMessageDrivenEndpoint.setErrorMessageStrategy()` and call respective `this.listener.setErrorMessageStrategy()` (cherry picked from commit da1ec07)
Fixes: #10046 Issue link: #10046 The `JmsMessageDrivenEndpoint` does not propagate an `ErrorMessageStrategy` down to the `ChannelPublishingJmsMessageListener.GatewayDelegate` * Expose `JmsMessageDrivenEndpoint.setErrorMessageStrategy()` and call respective `this.listener.setErrorMessageStrategy()` (cherry picked from commit da1ec07)
Great - thanks for such a quick turn-around on this one. Really appreciate it. |
In what version(s) of Spring Integration are you seeing this issue?
2.0.4.RELEASE -> LATEST (currently 6.5.0-RC1)
Describe the bug
The ChannelPublishingJmsMessageListener fails to proxy the setErrorMessageStrategy/getErrorMessageStrategy methods on its internal GatewayDelegate. This makes setting the error message strategy for message driven JMS channel adapters and gateways impossible.
To Reproduce
Expected behavior
The ChannelPublishingJmsMessageListener should proxy the setErrorMessageStrategy/getErrorMessageStrategy methods on its internal GatewayDelegate.
Sample
n/a
The text was updated successfully, but these errors were encountered: