Hi, I encounter an issue with Camel (2.13) and ActiveMQ (5.11.1) on JBoss EAP (6.1) where messages are processed in wrong order. It only occurs if there are a lot of messages send to a single queue.
I can reproduce it with a very simple example: <route id="sendRoute"> <c:from uri="activemq:queue:START-QUEUE" /> <loop> <constant>1000</constant> <c:setHeader headerName="testHeader"> <simple>${property.CamelLoopIndex}</simple> </c:setHeader> <c:to uri="activemq:queue:DESTINATION-QUEUE" pattern="InOnly"/> <c:setHeader headerName="testHeader"> <simple>${property.CamelLoopIndex}a</simple> </c:setHeader> <c:to uri="activemq:queue:DESTINATION-QUEUE" pattern="InOnly"/> </loop> </route> <route id="destinationRoute"> <c:from uri="activemq:queue:DESTINATION-QUEUE" /> <c:log message="$simple{header.testHeader}" /> </route> I'm starting this example by sending a message to activemq:queue:START-QUEUE via ActiveMQ console. In the first route I set the loop index to the header and send it to activemq:queue:DESTINATION-QUEUE. Than I overwrite the header by adding an "a" to the loop index and send it also to activemq:queue:DESTINATION-QUEUE. In the second route there is only one consumer reading messages from activemq:queue:DESTINATION-QUEUE and log the header value that was set in the first route. I assumed that for the same index (e.g. 671) it should always logged before the index containing the "a" (e.g. 671a), but it doesn't. For example I got the following output in log: 08:17:49,666 INFO [destinationRoute] 671a ... 08:17:52,385 INFO [destinationRoute] 671 Why are the messages processed in the wrong order? Is there any way to make sure that messages (for the same index) are always procssed in the correct order? If it not occurs if you run this example the first time, run it again. Mostly it occurs after the first 200 messages are procssed in the correct order. It's very important for this project to process the messages send to activemq:queue:DESTINATION-QUEUE in the correct order. -- View this message in context: http://activemq.2283324.n4.nabble.com/Message-processed-in-wrong-order-tp4708058.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.