Re: Master/Slave failover for camel routes

2014-11-03 Thread gilboy
Unfortunately AMQ cluster,Zookeeper etc are not an option as I am constrained
by internal approved tech stack.
Joe



--
View this message in context: 
http://camel.465427.n5.nabble.com/Master-Slave-failover-for-camel-routes-tp5758438p5758445.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Master/Slave failover for camel routes

2014-11-03 Thread gilboy
Done a little more digging round this and I take if I invoke the following:
 
*exchange.setProperty(Exchange.ROUTE_STOP,
CustomFaultToleranceAPI.isInActive());
*

From RoutePolicy.onExchangeBegin() this will ensure the exchange on the warm
instance will not be processed and yet the route will stay active

Thanks
Joe



--
View this message in context: 
http://camel.465427.n5.nabble.com/Master-Slave-failover-for-camel-routes-tp5758438p5758446.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Master/Slave failover for camel routes

2014-11-02 Thread gilboy
Hi

My camel routes are packaged in a war and deployed on a tomcat server. From
a failover strategy perspective I want to run hot/warm - same war deployed
on 2 different tomcat servers.

We have an inhouse fault tolerance component(not a camel component) which
identifies which tomcat instance is the master. Hence, there is an object in
both JVMs which indicates whether that particular instance is hot or warm.

In terms of integration with Camel I was intending on using the RoutePolicy.
I was going to provide my own concrete implementation of this class which
overrides the method onExchangeBegin. My implementation of this method would
interrogate the object I mentioned earlier to determine if it is the hot or
warm instance. When this method is invoked on the warm instance I obviously
don't want to process the exchange. However, I don't want to suspend the
route on the warm instance either. I would just like the route on the warm
instance to ignore the exchange and not process it. I am not sure what the
best way to do this is?

Thanks
Joe



--
View this message in context: 
http://camel.465427.n5.nabble.com/Master-Slave-failover-for-camel-routes-tp5758438.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Master/Slave failover for camel routes

2014-11-02 Thread Mark Frazier
It seems like you are doing a lot of extra work that’s not needed if you were 
just to run
against an AMQ cluster and let that handle the failovers. Is there a reason you 
can’t do that?

 On Nov 2, 2014, at 1:11 PM, gilboy josephoto...@gmail.com wrote:
 
 Hi
 
 My camel routes are packaged in a war and deployed on a tomcat server. From
 a failover strategy perspective I want to run hot/warm - same war deployed
 on 2 different tomcat servers.
 
 We have an inhouse fault tolerance component(not a camel component) which
 identifies which tomcat instance is the master. Hence, there is an object in
 both JVMs which indicates whether that particular instance is hot or warm.
 
 In terms of integration with Camel I was intending on using the RoutePolicy.
 I was going to provide my own concrete implementation of this class which
 overrides the method onExchangeBegin. My implementation of this method would
 interrogate the object I mentioned earlier to determine if it is the hot or
 warm instance. When this method is invoked on the warm instance I obviously
 don't want to process the exchange. However, I don't want to suspend the
 route on the warm instance either. I would just like the route on the warm
 instance to ignore the exchange and not process it. I am not sure what the
 best way to do this is?
 
 Thanks
 Joe
 
 
 
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Master-Slave-failover-for-camel-routes-tp5758438.html
 Sent from the Camel - Users mailing list archive at Nabble.com.