Error handling in Spring integration flow async

后端 未结 1 359
遇见更好的自我
遇见更好的自我 2021-01-13 18:13

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

相关标签:
1条回答
  • 2021-01-13 18:52

    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.

    0 讨论(0)
提交回复
热议问题