ErrorHandling with SpringIntegration
Hi,
I am trying to achieve the following:
A JMS consumer is communicating asynchronously with the Spring-Integration-driven backend. In my SI setup several services are usually executed consecutively before a response message is returned to the JMS consumer.
I am not entirely sure how to design the error handling for this and would like to ask for input on that. Basically what I wanted to achieve is that the JMS consumer sets a JMS_replyTo flag in the messages and gets a reply on that channel back that either contains the response message or an exception. How do I realize this in SI? The happy case is quite simple since the JMS Inbound GW takes care of that but how do I realize that all services in the chain of execution send errors back on that JMS_replyTo queue as well? Any ideas? Obviously I can catch all exceptions on the errorChannel and then open a JMS connection from there posting the reply on the JMS_replyTo queue but I was wondering if there are simpler ways to achieve that plus I had difficulties receiving exceptions on the errorChannel when they come in via the JMS Inbound Gateway (the exceptions got "lost" and were not posted to the errorChannel even though I marked the inbound channel as pollable).
Appreciate your help. Thanks.