How to ensure ordering in camel context polling weblogic jms queue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to ensure ordering in camel context polling weblogic jms queue

Jeffrey John
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