You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Anton Hughes <ku...@gmail.com> on 2015/12/04 12:53:45 UTC

Advice: how to shut down route after specified time

Hello

My use case: I would like to shut down a route after a specified amount of
time, and the the timer should be reset-able.

I have a web application that receives messages from a jms queue, and
pushes these to web clients. If the client has been inactive then we should
shut down that route. If/when the client is active, I would like to reset
the shutdown timer.

Does anyone have any suggestions on how I can elegantly, camelly, do this?

Thanks and regards,
Anton

Re: Advice: how to shut down route after specified time

Posted by sekaijin <je...@aphp.fr>.
Hi 
you can use camel-timer or camel-quartz and controlbus

http://camel.apache.org/timer.html
http://camel.apache.org/quartz.html
http://camel.apache.org/controlbus-component.html

something like:
from("timer://foo?fixedRate=true&period=60000&repeatCount=1").
to("controlbus:route?routeId=foo&action=stop");

Bye



--
View this message in context: http://camel.465427.n5.nabble.com/Advice-how-to-shut-down-route-after-specified-time-tp5774672p5774681.html
Sent from the Camel - Users mailing list archive at Nabble.com.