Reputation: 67
There are multiple servers that are listening to activemq. The chain is configured to make the http [outbound gateway] call. Suppose one of the server picks up the message and in-between if the http call fails for some reason. The message should be put back to the queue, so that another server can pick up the message and process. Can this be achieved using Spring Integration. I read lot on Transaction, however unable to find workable way.
Upvotes: 1
Views: 684
Reputation: 174484
Yes, simply set acknowledge="transacted"
on the <int-jms:message-driven-channel-adapter/>
and, as long as you use only direct channels (no <queue/>
on the channel or task-executor
on the channel's dispatcher) then any failure will cause the message to roll back.
Upvotes: 1