So it sounds like you'll have master/slave failover in your one route. That
is, on your "master" route, you'll use activemq's failover facilities to
failover to the slave broker if the master activemq broker goes down.

I guess the question is why need the "slave" route? In your setup, the
"slave" route will also end up connecting to the master broker and become a
second consumer on your destination. If your intention is to have a
"standby" route to pick up if the "master" route goes down, then I don't
know that Camel has that coordination built into it (maybe someone else can
chime in). You could build it pretty easily on your own with Zookeeper. Or
checkout the zookeeper component in Camel, which has some facilities for
doing master election (see bottom of this wiki):
http://camel.apache.org/zookeeper.html


On Wed, Jun 26, 2013 at 4:34 AM, deepak_a <angesh...@gmail.com> wrote:

> Hi,
>
> In my architecture, I have a Master/Slave set up of ActiveMQ (integrated
> with JBoss).
> ActiveMQ in master: tcp://localhost:61616
> ActiveMQ in slave: tcp://localhost:61617
>
> Camelcontext(s) runs in a separate VM.
> So I have 2 instances of camel context running (one for master one for
> Slave)
>
> Following is the CamelContext set up in Master
> failover:(tcp://localhost:61616,tcp://localhost:61617)?randomize=false
>
> Following is the CamelContext set up in Slave
> failover:(tcp://localhost:61617,tcp://localhost:61616)?randomize=false
>
> Idea is that if the master ActiveMQ goes down, there should be a seamless
> switch over (which it does).
>
>
> Problem I am facing is - specifically when the slave starts up, presumably
> the camel context and
> routes will be built even though the (slave) broker is not actively
> processing messages.
>
> The master will have a comparable camel context, and I'm worried
> about interference between the two Camel Context. How do the routes on the
> slave know not to try to do their processing? Some routes in these contexts
> will reference broker endpoints, but some may do things like hit external
> endpoints, which would be bad if this is competing with the comparable
> processing on the master.
>
> *Note:* I have tried setting autoStartup="false" (in the Slave's
> CamelContext) but this did not make any difference.
>
> regards,
> Deepak.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-in-Master-Slave-ActiveMQ-config-tp5734804.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Reply via email to