Hi Jeffrey, I've never faced this exact situation. But I wonder if a resequencer could help: https://github.com/apache/camel/blob/master/core/camel-core/src/main/docs/eips/resequence-eip.adoc I don't know if it plays well with transaction but it looks like it could be tested quickly.
My 2c, Alex On Fri, Jun 14, 2019 at 12:32 AM Jeffrey John <[email protected]> wrote: > I am trying to setup a camel context that polls a weblogic jms queue, > consumes the message and sends it to a webservice endpoint. Incase any > error occurs in the transaction or the target system is unavailable, I need > to redeliver the same message without losing sequence/ordering. > > I have set up a camel jms route with single consumer and enabled transacted > attribute as per https://camel.apache.org/transactional-client.html and > set > the redelivery as unlimited. > > When the transaction fails with messageA, the jms message consumption from > weblogic queue is rollbacked and the messageA is marked for redelivery > (state string is marked delayed) in weblogic. But during this time if > another message reaches the weblogic queue, the camel route picks the > messageB and forwards it to the target endpoint although the messageA is > still in retrying mode. This distorts the whole ordering of the messages. > > The transaction client is used to ensure that messages are not lost while > the application is shutdown during redelivery. > > I expect that there are no message loss and the messages are always sent in > the correct order as per generated into the weblogic queue to the target > endpoint. Is there any option in camel for ensuring such ordered > transactions? > > Appreciate your help. > > Regards, > > Jeff >
