camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakub Korab <>
Subject Re: How to handle requests sequentially for a given item
Date Tue, 20 Jan 2015 17:46:26 GMT
If you have access to ActiveMQ you could try putting the requests onto a
JMS queue, and using Message Groups
( Putting the item id in
the JMSXGroupId header will ensure that only one JMS consumer processes
the total set of messages for that item id sequentially.

The Camel code is then really straightforward.

    .setHeader("JMSXGroupId", simple("${body.itemId}"))



On 20/01/15 16:12, arthurs wrote:
> I need to only execute one route request at a time for a given item (ie
> object processed by the route).  So, if the second request with same item id
> comes in, it waits until the first one completes before continuing with
> processing.
> I understand that I can use onCompletion and thread libraries to implement
> this, but was wondering if there is a more elegant solution.
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

View raw message