Hello,

We are using camel 2.15.3 and using the spring to configure the camel
routes. We are trying to suspend/resume a route every 1 min. This appears to
work fine a few times, but eventually, we will try to resume a route and
notice the route is resumed, but no messages are processed and the seda
queue it consumes from is backing up.

Has anyone seen this happen? We have tried using java DSL to suspend/resume
to no avail

Route examples

*--every 60 secs suspend other route*

                <route>
                        <camel:from 
uri="quartz2://batchRefresh?trigger.repeatInterval=60000" />
                        
                        <camel:to
uri="controlbus:route?routeId=zeus-Incoming-Route&amp;action=suspend"/>

            <camel:log message="Attempting to send batch update..."/>
                        <camel:log message="Finished batch update..."/>

                        
                        <camel:to
uri="controlbus:route?routeId=zeus-Incoming-Route&amp;action=resume"/>
                        <camel:stop />
                </route>


*--- route that is suspended*

                <route id="zeus-Incoming-Route" startupOrder="3">
                        <from uri="seda:zeusIncoming" />
                        <camel:log message="Do something..."/>
                        <to uri="seda:neptuneAdapterInput" />
                        <camel:stop />
                </route>



*This a log snippet where the route is resumed and messages are processed
correctly:*


2015-09-21 15:51:36,837 [main] DEBUG o.a.c.m.MainSupport - Starting Spring
ApplicationContext:
org.springframework.context.support.ClassPathXmlApplicationContext@683a51de
2015-09-21 15:51:36,838 [main] DEBUG o.a.c.s.SpringCamelContext -
onApplicationEvent:
org.springframework.context.event.ContextStartedEvent[source=org.springframework.context.support.ClassPathXmlApplicationContext@683a51de:
startup date
[Mon Sep 21 15:51:14 BST 2015]; root of context hierarchy]
2015-09-21 15:51:36,838 [Thread 2] INFO 
c.c.i.f.c.e.m.u.BusinessEntityMsgFilterCache - Msg with strategyId
[235480486] and ISIN [XS0764278288] is ignored. Reason: [IGNORED] - No entry
in ProtoCache to delete
2015-09-21 15:51:36,840 [Thread 2] INFO 
c.c.i.f.c.e.m.u.BusinessEntityMsgFilterCache - Msg with strategyId
[235469509] and ISIN [XS0764278528] is ignored. Reason: [IGNORED] - No entry
in ProtoCache to delete
2015-09-21 15:51:36,846 [DefaultQuartzScheduler-CamelMain_Worker-1] INFO 
c.c.i.f.c.e.m.h.BusinessEntityMsgHandler - Batch refresh updated... List has
[0] members.
2015-09-21 15:51:36,846 [DefaultQuartzScheduler-CamelMain_Worker-1] INFO 
route1 - Attempting to send batch update...
2015-09-21 15:51:36,847 [DefaultQuartzScheduler-CamelMain_Worker-1] INFO 
route1 - Finished batch update...
2015-09-21 15:51:36,848 [DefaultQuartzScheduler-CamelMain_Worker-1] DEBUG
o.a.c.s.SpringCamelContext - Warming up route id: zeus-Incoming-Route having
autoStartup=true
2015-09-21 15:51:36,849 [DefaultQuartzScheduler-CamelMain_Worker-1] DEBUG
o.a.c.s.SpringCamelContext - Route: zeus-Incoming-Route >>>
EventDrivenConsumerRoute[Endpoint[seda://zeusIncoming] ->
Pipeline[[Channel[BeanProcessor[com.csg.ib.f
id.credit.etrading.madar.handler.BusinessEntityMsgHandler(0x2bfd4d4c)]],
Channel[Filter[if: Simple: ${body} == null do: Channel[Stop]]],
Channel[sendTo(Endpoint[seda://neptuneAdapterInput])], Channel[Stop]]]]
2015-09-21 15:51:36,849 [DefaultQuartzScheduler-CamelMain_Worker-1] DEBUG
o.a.c.s.SpringCamelContext - Resuming consumer (order: 3) on route:
zeus-Incoming-Route
2015-09-21 15:51:36,849 [DefaultQuartzScheduler-CamelMain_Worker-1] DEBUG
o.a.c.u.ServiceHelper - Resuming service
SedaConsumer[Endpoint[seda://zeusIncoming]]
2015-09-21 15:51:36,850 [DefaultQuartzScheduler-CamelMain_Worker-1] DEBUG
o.a.c.c.s.SedaConsumer - *Creating 1 consumer tasks with poll timeout 1000
ms.*
2015-09-21 15:51:36,850 [DefaultQuartzScheduler-CamelMain_Worker-1] INFO 
o.a.c.s.SpringCamelContext - Route: zeus-Incoming-Route resumed and
consuming from: Endpoint[seda://zeusIncoming]
2015-09-21 15:51:36,850 [DefaultQuartzScheduler-CamelMain_Worker-1] DEBUG
o.a.c.u.ServiceHelper - Resuming service
EventDrivenConsumerRoute[Endpoint[seda://zeusIncoming] ->
Pipeline[[Channel[BeanProcessor[com.csg.ib.fid.credit.etrading.
madar.handler.BusinessEntityMsgHandler(0x2bfd4d4c)]], Channel[Filter[if:
Simple: ${body} == null do:
Channel[Stop]]],Channel[sendTo(Endpoint[seda://neptuneAdapterInput])],
Channel[Stop]]]]
2015-09-21 15:51:36,850 [DefaultQuartzScheduler-CamelMain_Worker-1] INFO 
o.a.c.c.c.ControlBusProducer - ControlBus task done [resume route
zeus-Incoming-Route] with result -> void



*Log snippet where resuming route doesn't work. Consumer is not resumed*

2015-09-21 15:56:28,206 [DefaultQuartzScheduler-CamelMain_Worker-6] INFO 
o.a.c.i.DefaultShutdownStrategy - Starting to graceful shutdown 1 routes
(timeout 300 seconds)
2015-09-21 15:56:28,206 [Thread 3] DEBUG o.a.c.i.DefaultShutdownStrategy -
There are 1 routes to suspend
2015-09-21 15:56:28,206 [Thread 3] DEBUG o.a.c.i.DefaultShutdownStrategy -
Route: zeus-Incoming-Route shutdown deferred.
2015-09-21 15:56:28,207 [Thread 3] DEBUG o.a.c.c.s.SedaConsumer - Preparing
to shutdown, waiting for 1 consumer threads to complete.
2015-09-21 15:56:28,412 [Thread 3] DEBUG o.a.c.i.DefaultShutdownStrategy -
Route: zeus-Incoming-Route preparing to shutdown complete.
2015-09-21 15:56:28,413 [Thread 3] INFO  o.a.c.i.DefaultShutdownStrategy -
Route: zeus-Incoming-Route suspend complete, was consuming from:
Endpoint[seda://zeusIncoming]
2015-09-21 15:56:28,413 [Thread 3] DEBUG o.a.c.c.s.SedaConsumer - Preparing
to shutdown, waiting for 0 consumer threads to complete.
2015-09-21 15:56:28,413 [DefaultQuartzScheduler-CamelMain_Worker-6] INFO 
o.a.c.i.DefaultShutdownStrategy - Graceful shutdown of 1 routes completed in
0 seconds
2015-09-21 15:56:28,413 [DefaultQuartzScheduler-CamelMain_Worker-6] INFO 
o.a.c.s.SpringCamelContext - Route: zeus-Incoming-Route is suspended, was
consuming from: Endpoint[seda://zeusIncoming]
2015-09-21 15:56:28,413 [DefaultQuartzScheduler-CamelMain_Worker-6] INFO 
o.a.c.c.c.ControlBusProducer - ControlBus task done [suspend route
zeus-Incoming-Route] with result -> void
2015-09-21 15:56:28,415 [DefaultQuartzScheduler-CamelMain_Worker-6] INFO 
c.c.i.f.c.e.m.h.BusinessEntityMsgHandler - Batch refresh updated... List has
[0] members.
2015-09-21 15:56:28,415 [DefaultQuartzScheduler-CamelMain_Worker-6] INFO 
route1 - Attempting to send batch update...
2015-09-21 15:56:28,415 [DefaultQuartzScheduler-CamelMain_Worker-6] INFO 
route1 - Finished batch update...
2015-09-21 15:56:28,416 [DefaultQuartzScheduler-CamelMain_Worker-6] DEBUG
o.a.c.s.SpringCamelContext - Warming up route id: zeus-Incoming-Route having
autoStartup=true
2015-09-21 15:56:28,416 [DefaultQuartzScheduler-CamelMain_Worker-6] DEBUG
o.a.c.s.SpringCamelContext - Route: zeus-Incoming-Route >>>
EventDrivenConsumerRoute[Endpoint[seda://zeusIncoming] ->
Pipeline[[Channel[BeanProcessor[com.csg.ib.f
id.credit.etrading.madar.handler.BusinessEntityMsgHandler(0x2bfd4d4c)]],
Channel[Filter[if: Simple: ${body} == null do: Channel[Stop]]],
Channel[sendTo(Endpoint[seda://neptuneAdapterInput])], Channel[Stop]]]]
2015-09-21 15:56:28,416 [DefaultQuartzScheduler-CamelMain_Worker-6] DEBUG
o.a.c.s.SpringCamelContext - Resuming consumer (order: 3) on route:
zeus-Incoming-Route
2015-09-21 15:56:28,416 [DefaultQuartzScheduler-CamelMain_Worker-6] DEBUG
o.a.c.u.ServiceHelper - Resuming service
SedaConsumer[Endpoint[seda://zeusIncoming]]
2015-09-21 15:56:28,416 [DefaultQuartzScheduler-CamelMain_Worker-6] DEBUG
*o.a.c.c.s.SedaConsumer - Creating 0 consumertasks with poll timeout 1000
ms.*
2015-09-21 15:56:28,416 [DefaultQuartzScheduler-CamelMain_Worker-6] INFO 
o.a.c.s.SpringCamelContext - Route: zeus-Incoming-Route resumed and
consuming from: Endpoint[seda://zeusIncoming]
2015-09-21 15:56:28,417 [DefaultQuartzScheduler-CamelMain_Worker-6] DEBUG
o.a.c.u.ServiceHelper - Resuming service
EventDrivenConsumerRoute[Endpoint[seda://zeusIncoming] ->
Pipeline[[Channel[BeanProcessor[com.csg.ib.fid.credit.etrading.
madar.handler.BusinessEntityMsgHandler(0x2bfd4d4c)]], Channel[Filter[if:
Simple: ${body} == null do:
Channel[Stop]]],Channel[sendTo(Endpoint[seda://neptuneAdapterInput])],
Channel[Stop]]]]
2015-09-21 15:56:28,417 [DefaultQuartzScheduler-CamelMain_Worker-6] INFO 
o.a.c.c.c.ControlBusProducer - ControlBus task done [resume route
zeus-Incoming-Route] with result -> void







--
View this message in context: 
http://camel.465427.n5.nabble.com/Suspend-Resume-Routes-Unreliable-tp5771723.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to