camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Removing routes programmatically
Date Thu, 07 Jul 2011 15:30:34 GMT
On Thu, Jul 7, 2011 at 2:56 PM, Daniel Spaven <danspaven@gmail.com> wrote:
> Hey chaps,
>
> Just had another look at this and made some progress.
>
> Now my routes were from JMS to JMS and not with two inputs.
>
> However that did get me thinking because I was testing CBR routes consuming
> from the same JMS topic. When CBR routes are consuming off different topics
> it works fine. Here's my logs of the two scenarios:

Are you using durable topics?

And when you have multiple clients consuming from the same JMS topic,
do you have an unique client id configured?



>
> N:B: Both scenarios show me triggering two routes, removing one and then
> attempting to trigger the remaining route.
>
> 2 Routes consuming from the same topic name:
> ----------------------------------------------------------------------
> 2011-07-07 12:37:26,546 [Camel (camel-1) thread #0 - JmsConsumer[dansTopic]]
> INFO  bt.cbrComponent.model.CBRRouteBuilder - routing using route id: 1
> 2011-07-07 12:37:26,547 [Camel (camel-1) thread #1 - JmsConsumer[dansTopic]]
> INFO  bt.cbrComponent.model.CBRRouteBuilder - routing using route id: 2
> 2011-07-07 12:37:55,778 [qtp17829242-10] INFO  bt.cbrComponent.web.Routes -
> ------------- Deleting route id: 1 ---------------------
> 2011-07-07 12:37:55,972 [qtp17829242-10] INFO
> org.apache.camel.impl.DefaultShutdownStrategy - Starting to graceful
> shutdown 1 routes (timeout 300 seconds)
> 2011-07-07 12:37:55,975 [Camel (camel-1) thread #2 - ShutdownTask] DEBUG
> org.apache.camel.impl.DefaultShutdownStrategy - There are 1 routes to
> shutdown
> 2011-07-07 12:37:55,976 [Camel (camel-1) thread #2 - ShutdownTask] TRACE
> org.apache.camel.impl.DefaultShutdownStrategy - Shutting down route: 1 with
> options [Default,CompleteCurrentTaskOnly]
> 2011-07-07 12:37:55,976 [Camel (camel-1) thread #2 - ShutdownTask] TRACE
> org.apache.camel.impl.DefaultShutdownStrategy - Suspending:
> Consumer[dansJmsComponent://topic:dansTopic]
> 2011-07-07 12:37:55,977 [Camel (camel-1) thread #2 - ShutdownTask] TRACE
> org.apache.camel.impl.DefaultShutdownStrategy - Suspend complete for:
> Consumer[dansJmsComponent://topic:dansTopic]
> 2011-07-07 12:37:55,977 [Camel (camel-1) thread #2 - ShutdownTask] DEBUG
> org.apache.camel.impl.DefaultShutdownStrategy - Route: 1 suspended and
> shutdown deferred, was consuming from:
> Endpoint[dansJmsComponent://topic:dansTopic]
> 2011-07-07 12:37:55,978 [Camel (camel-1) thread #2 - ShutdownTask] TRACE
> org.apache.camel.impl.DefaultShutdownStrategy - Shutting down:
> Consumer[dansJmsComponent://topic:dansTopic]
> 2011-07-07 12:37:56,565 [Camel (camel-1) thread #2 - ShutdownTask] TRACE
> org.apache.camel.impl.DefaultShutdownStrategy - Shutdown complete for:
> Consumer[dansJmsComponent://topic:dansTopic]
> 2011-07-07 12:37:56,566 [Camel (camel-1) thread #2 - ShutdownTask] INFO
> org.apache.camel.impl.DefaultShutdownStrategy - Route: 1 shutdown complete,
> was consuming from: Endpoint[dansJmsComponent://topic:dansTopic]
> 2011-07-07 12:37:56,566 [qtp17829242-10] INFO
> org.apache.camel.impl.DefaultShutdownStrategy - Graceful shutdown of 1
> routes completed in 0 seconds
> 2011-07-07 12:37:56,567 [qtp17829242-10] INFO
> org.apache.camel.impl.DefaultCamelContext - Route: 1 stopped, was consuming
> from: Endpoint[dansJmsComponent://topic:dansTopic]
> 2011-07-07 12:37:56,570 [qtp17829242-10] INFO
> org.apache.camel.impl.DefaultCamelContext - Route: 1 shutdown and removed,
> was consuming from: Endpoint[dansJmsComponent://topic:dansTopic]
>
>
> 2 routes consuming from different topic names:
> ---------------------------------------------------------------------
> 2011-07-07 12:43:36,221 [Camel (camel-1) thread #1 -
> JmsConsumer[dansTopicExtra]] INFO  bt.cbrComponent.model.CBRRouteBuilder -
> routing using route id: 2
> 2011-07-07 12:43:36,224 [Camel (camel-1) thread #0 - JmsConsumer[dansTopic]]
> INFO  bt.cbrComponent.model.CBRRouteBuilder - routing using route id: 1
> 2011-07-07 12:43:53,310 [qtp17829242-10] INFO  bt.cbrComponent.web.Routes -
> ------------- Deleting route id: 1 ---------------------
> 2011-07-07 12:43:53,504 [qtp17829242-10] INFO
> org.apache.camel.impl.DefaultShutdownStrategy - Starting to graceful
> shutdown 1 routes (timeout 300 seconds)
> 2011-07-07 12:43:53,507 [Camel (camel-1) thread #2 - ShutdownTask] DEBUG
> org.apache.camel.impl.DefaultShutdownStrategy - There are 1 routes to
> shutdown
> 2011-07-07 12:43:53,507 [Camel (camel-1) thread #2 - ShutdownTask] TRACE
> org.apache.camel.impl.DefaultShutdownStrategy - Shutting down route: 1 with
> options [Default,CompleteCurrentTaskOnly]
> 2011-07-07 12:43:53,508 [Camel (camel-1) thread #2 - ShutdownTask] TRACE
> org.apache.camel.impl.DefaultShutdownStrategy - Suspending:
> Consumer[dansJmsComponent://topic:dansTopic]
> 2011-07-07 12:43:53,509 [Camel (camel-1) thread #2 - ShutdownTask] TRACE
> org.apache.camel.impl.DefaultShutdownStrategy - Suspend complete for:
> Consumer[dansJmsComponent://topic:dansTopic]
> 2011-07-07 12:43:53,509 [Camel (camel-1) thread #2 - ShutdownTask] DEBUG
> org.apache.camel.impl.DefaultShutdownStrategy - Route: 1 suspended and
> shutdown deferred, was consuming from:
> Endpoint[dansJmsComponent://topic:dansTopic]
> 2011-07-07 12:43:53,509 [Camel (camel-1) thread #2 - ShutdownTask] TRACE
> org.apache.camel.impl.DefaultShutdownStrategy - Shutting down:
> Consumer[dansJmsComponent://topic:dansTopic]
> 2011-07-07 12:43:54,250 [Camel (camel-1) thread #2 - ShutdownTask] TRACE
> org.apache.camel.impl.DefaultShutdownStrategy - Shutdown complete for:
> Consumer[dansJmsComponent://topic:dansTopic]
> 2011-07-07 12:43:54,250 [Camel (camel-1) thread #2 - ShutdownTask] INFO
> org.apache.camel.impl.DefaultShutdownStrategy - Route: 1 shutdown complete,
> was consuming from: Endpoint[dansJmsComponent://topic:dansTopic]
> 2011-07-07 12:43:54,250 [qtp17829242-10] INFO
> org.apache.camel.impl.DefaultShutdownStrategy - Graceful shutdown of 1
> routes completed in 0 seconds
> 2011-07-07 12:43:54,252 [qtp17829242-10] INFO
> org.apache.camel.impl.DefaultCamelContext - Route: 1 stopped, was consuming
> from: Endpoint[dansJmsComponent://topic:dansTopic]
> 2011-07-07 12:43:54,252 [qtp17829242-10] INFO
> org.apache.camel.impl.DefaultCamelContext - Route: 1 shutdown and removed,
> was consuming from: Endpoint[dansJmsComponent://topic:dansTopic]
> 2011-07-07 12:44:10,011 [ActiveMQ Task-5] INFO
> org.apache.activemq.transport.failover.FailoverTransport - Successfully
> connected to tcp://localhost:61616
> 2011-07-07 12:44:10,077 [Camel (camel-1) thread #1 -
> JmsConsumer[dansTopicExtra]] INFO  bt.cbrComponent.model.CBRRouteBuilder -
> routing using route id: 2
>
> Hope this helps,
>
> Dan
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message