Thank you for the quick reply Claus. I have one more question regarding my issues. Trying to dig some more in the camel activemq in/out messaging behaviour, here are some more results that I needed help to understand.
I tried using the route the I have given above using two karaf instances (kind of clustered environment). The route reads a request from CXF endpoint and sends the request to IN/OUT active endpoint, receives the response back and sends it back to the CXF endpoint. When I'm running only a single karaf instance (one cluster) then everything works fine. I have 15 consumers created on the request and response queue (concurrentConsumers and maxConcurrentConsumers are 15 in my case) in separate unique session (maxACtiveSessionPerConnection is -1 and maxConnections are 10). The request is sent to the requestQueue, the response is fetched and mapped to the request using correlationId (all of this is taken care by Camel ACtiveMQ - no customized code from my side on top of it). When I start the second karaf instance (cluster2), it creates its additional set of 15 consumers (resulting to a total of 30) on the request and response Queue. And this is where the problem starts. After this when I send a request, sometimes, it is put in the request queue (verified from ActiveMQ web console, I can see the message in the queue and enqueue count is incremented by 1) but even though that queue has 30 consumers, no one picks up the message and it is moved to DLQ after expiration. Sometimes, if the message is processed by the consumer of the request queue, it puts the response on the response queue but now I get response received for unknown correlationId and right after the timeout, I see ExchangeTimedOut exception for the same correlation id for which the response was received above and QueueReplyMAnager was not able to map it to the correct request. I want to understand how this works internally. If there is any book/guide/blog where I can read/understand this, it will be of a great help to me. So far my analysis is that, KAraf instance 1, creates 15 consumers each having its own session as part of one connection. When I start Karaf 2, it creates a second connection to the broker and thus having 15 concurrent consumers each having same session as the 15 consumers of karaf 1 (verified this from activemq webconsole - active consumers list on the queue). So each session now has 2 consumers. I'm using in memory persistent for ActiveMQ broker. Even if this the case, ideally, any one of the consumer should be able to consume the message no matter which Karaf instance's producer sent the message to that queue. So all producers should be able to put the message and any one of the consumers should be able to read the message process it and also map the correlation id to the original request. But this is not happening. Why is so? And what is the correct approach or configuration to solve this problem? Many Thanks. BR! Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/Camel-ActiveMQ-In-OUT-endpoint-creates-additional-consumers-on-response-queue-which-are-more-than-mas-tp5764288p5764344.html Sent from the Camel - Users mailing list archive at Nabble.com.