Great. That looks like just what I need.

Thanks.

--
Erlend
On Apr 18, 2011 4:23 PM, "James Strachan" <ja...@fusesource.com> wrote:
> On 18 April 2011 15:14, Erlend Hamnaberg <ngar...@gmail.com> wrote:
>> Hello list.
>>
>> I am trying to use concurrent consumers pattern with JMS.
>>
>> The use case is:
>>
>> Messages from each sender needs to be kept in order.
>>
>> Sender A, B and C.
>>
>> Messages sent:
>>
>> A1, B1, C1, B2, A2, C2, C3, A3, B3
>>
>> Output:
>> A1, A2, A3
>> B1, B2, B3
>> C1, C2, C3
>>
>> Is there a way in Camel to ensure that the Order is kept, for instance
>> always mapping to the same Thread whenever consuming messages from Sender
A?
>>
>> Would maybe JMSGroupID help here?
>
> In general concurrent consumption of any kind of queue data structure
> is going to break order (the same would be true if you used the seda
> component in Camel for example).
>
> But yes, setting a JMSXGroupID header to some value to correlate
> messages (e.g. the sender ID) to be processed in order will help with
> ActiveMQ yes.
>
> See this for more detail...
> http://activemq.apache.org/how-do-i-preserve-order-of-messages.html
>
> --
> James
> -------
> FuseSource
> Email: ja...@fusesource.com
> Web: http://fusesource.com
> Twitter: jstrachan, fusenews
> Blog: http://macstrac.blogspot.com/
>
> Connect at CamelOne May 24-26
> The Open Source Integration Conference
> http://camelone.com/

Reply via email to