Oct 31st, 2011, 10:50 AM
AMQP global Interceptor and transactions - Question
What happens to the message in the channel if interceptor implementation gives a stack? Would the whole transaction be rolled back and the message be sent to dead channel?
And the same way what happens if sending of message to queue fails?
How this is different from wire-tap?
Nov 1st, 2011, 07:02 AM
Not sure what you mean by "dead channel", but for the sake of clarity there is no broker support for dead letters in AMQP. A re-queued message is just re-queued where it started.
The channel you are talking about is a Spring Integration channel? If so, and a transaction is in flight with Spring Rabbbit, then it will roll back on an exception anywhere in the message flow, as long as it is single-threaded (i.e. uses only direct channels with no async handoff). Same applies to sending.
Wire tap is a specific EIP pattern that sends a copy of a message to another channel. You could implement that as an interceptor, but an interceptor is more generic.