I have a Camel route that listens to an ActiveMQ. I have added a delay of 10 seconds to because it needs to be certain that another process has completed before commencing. This has been achieved by adding the delayer attribute: -
<camel:route id="packageRetrievalContentAndSendToS3" delayer="10000">
<camel:from uri="activemq:{{ccs.activemq.queue.prefix}}.sr.package.and.send"/>
....extra steps....
</camel:route>
This works fine, but the trouble is, my route now times out! Message below.
Atomikos:8] c.a.icatch.imp.ActiveStateHandler : Timeout/setRollbackOnly of ACTIVE coordinator !
I would really appreciate any advice as to how to address this. Ideally I would like to increase the timeout on that route. Many thanks
As @sergei-petunin already commented, you try to compensate a design issue by waiting.
Your route should not receive a message before the thing you wait for is finished. That means that
So all partial steps of the process are done asynchronous and sequentially because they depend on each other. This is also known as the Pipes and Filters EIP.
If you have control over the thing you wait for, you can easily change the design by putting a message queue between the thing you wait for and your route.