I have the following Spring Integration configuration that allows me to call a gateway method from MVC Controller and letting controller return, while integration flow will
A gateway with a void
return expects no reply so there is no reply/error channel added to the message headers. When run on the calling thread, the exception is thrown to the caller; with an async flow, the exception will go to the default errorChannel
(which has a log adapter attached).
For this scenario, you need to add a header enricher to set the errorChannel
header to your error channel.
We should look into doing that automatically, but it does not happen currently.
I opened a JIRA Issue for this.