The NoB should be routing your messages for you, shouldn't it?
On Wed, Oct 23, 2013 at 1:52 PM, dunnlow <dunn...@yahoo.com> wrote: > Using Camel 2.10.3 > > My question: What is the best way to consume msgs from multiple > brokers/queues and feed those messages through a single route? > > Explanation: > > I currently consume from an activemq broker. I have several different > routes that consume messages from different queues on that broker. Now, the > admins have updated to a network of brokers. > > The producers of the messages are using failover (there are only two brokers > at the moment). Because those producers could place msgs on either broker, > I want to check both brokers (I had a past issue on a different project > where the producers failed over briefly and sent msgs to the backup that > were never consumed even though I was using a failover url. My solution at > the time was to always check/consume from both primary and backup - ignoring > failover - using a second activemq config to the secondary broker). > > My problem is that now I have many routes and I want msgs from either the > primary or backup jms queue to propagate through those routes without having > to duplicate the route for each broker. For example, I DONT want to do this > for each route (my actual routes are more complex than these): > > <route> > <from uri="activemq:queue:Queue1"/> > <bean ref="MyBean" method="evaluate"/> > <to uri="direct:processit"/> > </route> > > <route> > <from uri="activemq2:queue:Queue1"/> > <bean ref="MyBean" method="evaluate"/> > <to uri="direct:processit"/> > </route> > > I realize I could make the route above a direct route and then consume from > each broker and send to it, but this still seems ugly: > > <route> > <from uri="direct_activemq_Queue1/> > <bean ref="MyBean" method="evaluate"/> > <to uri="direct:processit"/> > </route> > > <route> > <from uri="activemq1:queue:Queue1"/> > <to uri="direct:direct_activemq_Queue1"/> > </route> > > <route> > <from uri="activemq2:queue:Queue1"/> > <to uri="direct:direct_activemq_Queue1"/> > </route> > > I've considered combining into a single in-memory queue, but I've never done > that before and would worry about robustness of the queue (I can't lose any > messages). > > What is the smart way to do this? > > Thanks very much for any insight! > > -J > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Best-way-to-consuming-same-queue-from-two-brokers-tp5742100.html > Sent from the Camel - Users mailing list archive at Nabble.com.