Re: Incoming message from a JMS queue need to be processed in parallel but keep the ordering of messages

2013-07-27 Thread salemi
Hi Guys, I am now exploring the idea of JMS message groups. I was wondering how we can configure camel properly to support proper routing in a failover scenario. In a fail over scenario, I need two camel instances per messages groups. I my example above we will need two camel instances for a , b

Re: Incoming message from a JMS queue need to be processed in parallel but keep the ordering of messages

2013-07-16 Thread gquintana
Seda breaks transaction propagation since different threads are used. But you can replace seda by JMS from(jms:queue:abc) .choice() .when(simple(body.msg.type).isEqualTo(a)) .to(jms:queue:only_a)

Re: Incoming message from a JMS queue need to be processed in parallel but keep the ordering of messages

2013-07-16 Thread Raul Kripalani
On Tue, Jul 16, 2013 at 9:48 AM, gquintana gerald.quint...@gmail.comwrote: Seda breaks transaction propagation since different threads are used. But you can replace seda by JMS This applies when a Global TransactionManager is in place (e.g. JTA), whose typical way of synchronizing several

Re: Incoming message from a JMS queue need to be processed in parallel but keep the ordering of messages

2013-07-15 Thread salemi
Thank you for your respond. I am not sure if I can use concurrent consumer option since I have to keep the order of messgaes for the buckets. I like your idea to have a route that calculates the Group header but doing that is it not going to be the bottleneck for the processing. I have to run at

Re: Incoming message from a JMS queue need to be processed in parallel but keep the ordering of messages

2013-07-13 Thread Raul Kripalani
Use the concurrentConsumers option in the JMS consumer to start multiple receiving threads. Make sure to use the transacted mode to leverage broker-side redeliveries. Like Claus said above, use JMS Message Groups to serialize the processing of messages that share a key. If your producer cannot

Re: Incoming message from a JMS queue need to be processed in parallel but keep the ordering of messages

2013-07-12 Thread salemi
Yep, I was thinking about this approach as well. Using Seda is the transnational integrity preserved? Let say the delivery of one message using seda fails, does camel recognize it and redeliver it? - Alireza Salemi -- View this message in context:

Re: Incoming message from a JMS queue need to be processed in parallel but keep the ordering of messages

2013-07-10 Thread Gnanaguru S
Hi Salemi, Typically you can use content based router to categorize the messages. http://camel.apache.org/content-based-router.html Regards Guru @gnanagurus -- View this message in context:

Re: Incoming message from a JMS queue need to be processed in parallel but keep the ordering of messages

2013-07-10 Thread gquintana
You could have one (and only one) JMS message listener for each kind of message and use JMS message selector to let one thread select some kind of messages while leaving other ones. Each listener thread will consume ordered messages of one kind, each listener will separately from others. --

Re: Incoming message from a JMS queue need to be processed in parallel but keep the ordering of messages

2013-07-10 Thread salemi
Thank you for the responds. The problem I have is that I don't have any control of producer and I can't ask the producer to put information in the header of the message in order to use the grouping of ActiveMQ. - Alireza Salemi -- View this message in context:

Re: Incoming message from a JMS queue need to be processed in parallel but keep the ordering of messages

2013-07-10 Thread gquintana
Then why don't you do something like: The route from JMS to Seda is monothreaded, but it should be fast enough (the bottleneck is javaspaces, is it?), then each route from Seda to Javaspaces can work in parallel. -- View this message in context: