Maybe use an aggregator so you can assemble the total of messages. Or a resequencer. See the camel site for docs 26. mai 2016 3:07 p.m. skrev "NikheelRanjan" <nikheel.ran...@gmail.com>:
> I am using camel's jms component and ibm based queues. > Problem statement: Each message is coming with some vehicle data and > vehicle > data come in chunks.That means the chunks(each has vehicleID associated) > which belong to one vehicle has to follow a specific order otherwise it can > cause mismatch/error.Each chunk is delivered in order and at an interval of > 500 ms.Now I am opening up concurrent consumers from the main queue and > reading the messages.The problem is in some conditions one thread can pick > the last chunk earlier and can cause the mismatch. > > Solution which I am Trying: > Read the message the very first time and set jms header and pass it to > another queue where the grouping will maintain thread order.i.e. Each time > you read a message use the same thread if the vehicleId is same and hence > chunks for same vehicle will come in sequence.For this I looked in to > grouping of messages on jms header like JMSXGroupID but it was working only > in active mq not for ibm based queue. > (http://activemq.apache.org/message-groups.html). > Can some body provide me any idea in solving this sequencing issue. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Single-thread-for-same-message-group-tp5783100.html > Sent from the Camel - Users mailing list archive at Nabble.com. >