camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Gies <>
Subject Re: Round Robin in Camel Routes
Date Thu, 18 Jul 2013 17:22:43 GMT
Still kind of confused ;)

If I understand correctly you have 3 inbound routes from different
locations all of which point to a Active MQ Queue.

If you have only one consumer the messages will be processed in the order
they arrive in the queue (wellŠin the simplest case)
regardless where they came from.

If you have more than one consumer on the queue, that changes. The
messages will be processed in a round robin fashion
across your consumers. If you want to have a dedicated set of consumers
for each inbound endpoint, I would suggest different queues.
If you can't do that you can use message selectors or filters in camel.

If you need to route groups of messages to the same consumer, you should
have a look at ActiveMQ's message group feature

I *think* that reading between the lines you are expecting your consumers
to actively fetch messages. IMHO an ESB architecture
is primarily event driven, so that the inbound side pushes messages and
the consumer side is notified when those messages arrive.
The underlying JMS Broker (in this case ActiveMQ) allows all kind of
dispatching strategies.

Hope that helps

Am 7/18/13(29) 7:02 PM schrieb "deepak_a" unter <>:

>I was not clear in my earlier query.
>let me clarify.
>In my current architecture I have multiple routes set up.
>Each route has has a unique 'from' point and a 'to' end point (that is
>common for all routes)
>Route 1: From: MQ-Queue;    To: inbound.Queue (in activeMQ)
>Route 2: From: FTP;             To: inbound.Queue (in activeMQ)
>Route 3: From: Webservice;   To: inbound.Queue (in activeMQ)
>The issue I am facing is - since my destination (To end point) is Queue
>is common for all routes, I am not able to evenly process the messages
>each endpoint.
>My query is is it possible to set up one route like this
>Route 1:
>From: MQ-Queue;
>From: FTP;
>From: Webservice; 
>To: inbound.Queue (in activeMQ)
>The same route consumes messages from each from point in a round-robin
>manner and push message to the destination?
>View this message in context:
>Sent from the Camel - Users mailing list archive at

View raw message