> Thanks, Claus. I ended up using the loop DSL, and it looks like the
> messages are created properly on the queue with the proper JMSXGroupID
> header property.
> However, now when I attempt to process them, they are all being processed
> in a pipeline (serial). And if I set it to async, the rules of
> MessageGroups don't seem to apply (i.e. multiple messages in MessageGroupA
> get processed simultaneously).
>
> Here is my route:
> from("activemq:personnel.records_sink").
> loop(3).
> to("bean:pushModeProcessor").
> to("activemq:queue:pushModeAgentQueue").
> to("bean:pushEventToAgent");
>
> activemq:personnel.records_sink is my source to start the process
> I have it looping three times (for testing)
> pushModeProcessor bean adds the appropriate header:
> exchange.getIn().setHeader("JMSXGroupID", groupName);
> pushModeAgentQueue is the queue that holds the message
> pushEventToAgent bean simply waits for a time (depending on the groupName)
> and prints out a message.
>
> Am I missing something obvious?
> On my console, I can see that the message in group 1 is processed (10
> seconds), and then message in group 2 (5 seconds), and then 1 (1 second).
> I would expect to see group 1 start, group 2 start, group 3 start, group 3
> complete, group 2 complete, and finally group 1 complete.
>
I figured out the issue. I had to have to routes
- the first would terminate after the loop/bean/push to queue.
- the second would start from the queue and call the pushEventToAgent bean.
What I was missing before was I set in the from queue uri (in the second
route) "?concurrentConsumers=5".
Everything is now working - thanks.
--
View this message in context:
http://old.nabble.com/how-to-route-a-single-message-to-multiple-MessageGroups--tp28616669p28634679.html
Sent from the Camel - Users mailing list archive at Nabble.com.