spring integration - exception handling in int-jpa:updating-outbound-gateway - Stack Overflow
The error-channel
is for flows which works independently of the user: Message Driven Channel Adapter, e.g. <int-jms:message-driven-channel-adapter>
, where an Listener Container is started in the infinite loop and does its work actively.
Another sample is Polling Consumer, which runs the polling task periodically, e.g. <int-file:inbound-channel-adapter>
, or anyone as a consumer on the QueueChannel
. And again: it does that actively, independently of your existence.
The <int-jpa:updating-outbound-gateway>
is passive component, therefore it can't do anything until you send a message. Therefore any error caused in this kind of components are thrown to the caller, like it is done in the raw Java method invocation.
Read more about error handling in the Reference Manual.
For your use-case you should consider to add error-channel
in the upstream poller if that.
Another case is ExpressionEvaluatingRequestHandlerAdvice, which with its failureChannel
may play some kind of error handling for the particular MessageHandler
.
Read full article from spring integration - exception handling in int-jpa:updating-outbound-gateway - Stack Overflow
No comments:
Post a Comment