camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smikhalevski <smikhalev...@gmail.com>
Subject Init a route but preserve its consumer in stopped state
Date Wed, 05 Feb 2014 14:47:24 GMT
Hello allI've faced an issue with no possible way to init a route (warm it
up) but preserve its consumer in stopped state.It turned out that in Camel
2.10, Route instance passed to RoutePolicy#onInit(Route route) is not yet
initialized, so does not have consumer assigned (route.getConsumer() ==
null). I also tried to stop consumer in #onStart callback but it fires
_after_ route was started so consumer has time to grab some messages before
it is actually stopped.My purpose is to implement hot standby policy for
routes and have possibility to pause and resume them in a really quick
manner, so suspending (stopping) and resuming (starting) consumers is the
best solution for me.Is there a way to walk around this problem and init a
route keeping its consumer in stopped (suspended) state?Thanks in
advance,Savva



--
View this message in context: http://camel.465427.n5.nabble.com/Init-a-route-but-preserve-its-consumer-in-stopped-state-tp5746851.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message