Petter Nordlander
Petter Nordlander

Reputation: 22279

Start Camel route in suspended state

Is there a way to build Camel routes that starts in suspended mode? I'm looking so to say "declutch" at start up, then at some stage quickly start processing messages by just calling resumeRoute(routeId)

I could perhaps just create the route and then quickly call suspendRoute(routeId), after the route has been created, but at that stage, it would probably have consumed some messages (for instance in the case of JMS routes or polling consumer routes).

Upvotes: 0

Views: 1306

Answers (1)

Ben ODay
Ben ODay

Reputation: 21005

generally, you'd just disable the route by using autostartup(false)...

I assume you are asking though because you need the route started (warmed), but not active. In that case, then you should be able to use a custom route policy and some external variable to get this behavior

Upvotes: 3

Related Questions