camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashwin Karpe <>
Subject Re: Activemq dynamic endpoint configuration
Date Thu, 01 Sep 2011 15:57:08 GMT

I believe you are going about this completely wrong.

What you need is to set up an EventManager object/entity that can keep an
eye on ActiveMQ using Advisory queues/topics or JMX to figure out the queues
and whether there are messages on these queues/topics. 

The this EventManager needs to be able to perform route lifecycle operations
(aka start, stop, suspend & resume routes) as and when queues and topics
contain messages or are drained.

Obviously, this solution becomes rather expensive and ineffective if the
drained queues fill up after very short waits since the Event Manager will
spend a most of its time starting and stopping routes for little value.

If you have a reference to the camel context, starting, stopping, suspending
and resuming routes is all simple and API driven.

Note that when you stop routes, you must take care to ensure that there are
no exchanges being processed by the route at the time. There is a graceful
shutdown on routes so please use this...

Hope this helps.



Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary) 

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message