0
votes

I am currently working on an application with Spring Integration. The application requires guaranteed delivery and the option that the it will be functional for a specific amount of time that the external systems are unavailable without losing messages. Channels will be JMS backed with expiration time. I would like to understand which is the best practice for redelivery with Spring Integration. We are having the following options:

  1. The application's integration flow has a number of outbound message gateways that requires RPC calls with external system. Statefull retry advice can be used. After the max attemps is reached for specific runtime exceptions the message will be addressed to a recovery channel. The recovery channel will use a delayer and will then address the message back to the original channel. After X times that the message will reach the recovery channel it will be addressed to the error channel where it will be simply logged without further processing. The delayer component in this case should use the jdbc message store option.

  2. Another option would be to use the standard JMS option for redelivery. In this case the redelivery policy will not be implemented on Spring Integration but on the JMS provider side.

Which is the best practice for message redelivery with Spring Integration?

1

1 Answers

1
votes

I'd say like this: don't reinvent the wheel!

If there is already some similar solution on the matter, just use it as is with its specific configuration.

Right, if JMS has that solution, just go ahead. There is need, of course, to get deal with DLQ in case of message expiration or redelivery exhausting. But the concept is here.