Looping inOut messages on activemq get stuck
Issue
- We have a number of routes that send messages via AMQ. In some cases a route may be used twice in the chain. When the message is sent to the queue the second time it appears to be allocated to the same consumer that sent the message resulting in a stuck message.
<route id="loop">
<from uri="activemq:inbox?destination.consumer.prefetchSize=1"/>
<filter>
<simple>${header.count} == null</simple>
<setHeader headerName="count">
<constant>0</constant>
</setHeader>
</filter>
<setHeader headerName="count">
<ognl>request.headers.count + 1</ognl>
</setHeader>
<filter>
<simple>${header.count} >= 3</simple>
<log message="message looped 3 times"/>
<stop/>
</filter>
<inOut uri="activemq:inbox"/>
</route>
Environment
- Red Hat JBoss Fuse
- 6.1.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
