Hi,

It may be architectural overkill for Camel to fail-over messages that are
inflight to another camel context with another identical route. The cost of
adding fail-over implies message persistence by the camel core and a degree
of stateful-ness which adds to cost per message for not enough value, while
guarding against catastrophic failure. Inflight messages counts in Camel are
captured and shown in JMX to provide visibility into processing efficiency
as routes are by nature multi-threaded and also to ensure shutdowns & route
suspensions can be gracefully executed. 

Moreover, there are other ways in which this requirement can be easily met
without altering/adding cost to per message delivery. For example,
persisting messages in a JMS queue and then using a JMS transaction or a
transactional Camel route will ensure that the transaction is rolled back to
the last persist point prior to the route picking the message up. This will
allows another identical route looking at the same queue/topic to pick the
rolled back message and process it. It will also ensure that you use a
solution that is more suited to what you are looking to accomplish without
potentially unnecessary and complex engineering.

The ability to failover can also be quickly built instrumented into
applications using heartbeat messages to ensure that the context/route is up
and active. While this may not protect you transactionally, it will ensure
that you will still have a fallback strategy.
         
Hope this helps.

Cheers,

Ashwin...     



-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
Red Hat 
http://www.redhat.com 

Blog: http://opensourceknowledge.blogspot.com 
---------------------------------------------------------
--
View this message in context: 
http://camel.465427.n5.nabble.com/Failing-over-in-flight-exchanges-tp5725162p5725188.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to