-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Send the gateway Timeout Exception into the errorChannel and not a TemporaryReplyChannel #8705
Comments
How about to configure that error channel exactly on the
There is also this option for a gateway to configure:
|
Thanks Artem,
No, it doesn't work. Here ist my Example.
I don't see this option in my gatewaySpec. Can you provide an example?
|
You are right, my bad: the If OK with this, I'll go ahead and expose that
But I believe this |
Fixes spring-projects#8705 an internal `MethodInvocationGateway` is a `MessagingGatewaySupport` extension with all the logic available there. One of the option introduced in `5.2.2` to be able to throw a `MessageTimeoutException` instead of returning `null` when no reply received in time from downstream flow * Expose an `errorOnTimeout` on the `@MessagingGateway` and `GatewayEndpointSpec` * Propagate this option from a `GatewayProxyFactoryBean` down to its internal `MethodInvocationGateway` implementation * Modify couple tests to react for `errorOnTimeout` set to `true` * Document the feature
Expected Behavior
Gateway timeout exceptions, like any other exceptions thrown in the flow, are send to the errorChannel.
Also a custom errorMessage handling is possible.
Current Behavior
A gateway timeout exception is not send to the errorChannel (like any other exceptions in the flow), but a TemporaryReplyChannel.
In this case a custom errorChannel exception-handling is not impossible.
Context
Because of the breaking-change in Version 6.1.0. (https://github.com/spring-projects/spring-integration/wiki/Spring-Integration-6.0-to-6.1-Migration-Guide#do-not-block-by-default).
Code example, with this behavior:
Because a custom errorChannel was defined, I expect that all exceptions from the longRunningSubflow(), are passed in payload to 'MY_ERROR_CHANNEL' ().
It works fine, but in case the longRunningSubflow() needs more then 30 Seconds, a timeout exception is thrown, ignoring the
errorChannel configuration, instead it is passed to a dynamically created TemporaryReplyChannel.
The text was updated successfully, but these errors were encountered: