You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by verystrongjoe <ve...@gmail.com> on 2013/05/10 10:19:41 UTC

difficult and unusual configuration..

I'm so stucked on configuring like the below..
it's been for 5 days.. 

Condition...
1) producer , consumer and broker is loaded on same jvm.  
2) each producer in one server have to deliver messages to the producer of
same server.
3) if one of servers is killed, I want the other server's broker to get the
messages of killed node and execute instead of killed node.  
<http://activemq.2283324.n4.nabble.com/file/n4666877/croppercapture50.jpg> 

so, I'm using master-slave configuration and vm connector and jdbc
persistent adpater.
without using failover schema, can i share the data through the jdbc
persistent adaptor of brokers?

please give some colborate advice or hint...
thanks in advance..







--
View this message in context: http://activemq.2283324.n4.nabble.com/difficult-and-unusual-configuration-tp4666877.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: difficult and unusual configuration..

Posted by Christian Posta <ch...@gmail.com>.
Paul, that is correct.


On Sun, May 12, 2013 at 7:01 PM, Paul Gale <pa...@gmail.com> wrote:

> >I saw this document from here
> http://activemq.apache.org/jdbc-master-slave.html and i think in here they
> allow brokers to have more than 2.
> >Did i misunderstand what you mean?
>
> In master-slave you can have as many brokers as you want, regardless of the
> storage strategy in use. However, there can only be one master at any one
> instant in time. The other brokers will remain slaves. As slaves they have
> their transport connectors turned so as not to accept any client
> connections. They are also constantly trying to acquire the shared lock
> that the master hold. If the master dies one of the slaves will be
> successful in its next attempt to acquire the lock as the master will not
> have been able to renew its lease on the lock. Once acquired the slave
> holding the lock will automatically promote itself to become the new master
> at which point it will turn on its transport connectors and start accepting
> client connections.
>
> One requirement for all this to work is that all clients must be using the
> failover protocol to connect to a broker. In turn all clients using the
> failover protocol must know the addresses of all the brokers as
> load-balancing is done client-side; an unfortunate consequence of using the
> failover protocol. I suppose you could mitigate this by putting all the
> brokers behind a load-balancer and have all clients use a single VIP
> although how the load-balancer would know which broker was the new master
> is not clear to me.
>
> At least that's how I've always understood it.
>
> Feel free to correct any errors.
>
> Thanks,
> Paul
>
>
> On Sun, May 12, 2013 at 8:24 PM, verystrongjoe <verystrongjoe@gmail.com
> >wrote:
>
> > thanks for reply.
> > so you mean the master/slave have to configured with only 2 brokers?
> >
> > I saw this document from activemq.org ( here
> > <http://activemq.apache.org/jdbc-master-slave.html>  )
> > and i think in here they allow brokers to have more than 2.
> > did i misunderstand what you mean?
> >
> > and how about using vm connector and putting the jdbc persistent adaptor
> to
> > each broker?
> >
> >
> >
> > --
> > View this message in context:
> >
> http://activemq.2283324.n4.nabble.com/difficult-and-unusual-configuration-tp4666877p4666941.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
>



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

Re: difficult and unusual configuration..

Posted by Paul Gale <pa...@gmail.com>.
>I saw this document from here
http://activemq.apache.org/jdbc-master-slave.html and i think in here they
allow brokers to have more than 2.
>Did i misunderstand what you mean?

In master-slave you can have as many brokers as you want, regardless of the
storage strategy in use. However, there can only be one master at any one
instant in time. The other brokers will remain slaves. As slaves they have
their transport connectors turned so as not to accept any client
connections. They are also constantly trying to acquire the shared lock
that the master hold. If the master dies one of the slaves will be
successful in its next attempt to acquire the lock as the master will not
have been able to renew its lease on the lock. Once acquired the slave
holding the lock will automatically promote itself to become the new master
at which point it will turn on its transport connectors and start accepting
client connections.

One requirement for all this to work is that all clients must be using the
failover protocol to connect to a broker. In turn all clients using the
failover protocol must know the addresses of all the brokers as
load-balancing is done client-side; an unfortunate consequence of using the
failover protocol. I suppose you could mitigate this by putting all the
brokers behind a load-balancer and have all clients use a single VIP
although how the load-balancer would know which broker was the new master
is not clear to me.

At least that's how I've always understood it.

Feel free to correct any errors.

Thanks,
Paul


On Sun, May 12, 2013 at 8:24 PM, verystrongjoe <ve...@gmail.com>wrote:

> thanks for reply.
> so you mean the master/slave have to configured with only 2 brokers?
>
> I saw this document from activemq.org ( here
> <http://activemq.apache.org/jdbc-master-slave.html>  )
> and i think in here they allow brokers to have more than 2.
> did i misunderstand what you mean?
>
> and how about using vm connector and putting the jdbc persistent adaptor to
> each broker?
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/difficult-and-unusual-configuration-tp4666877p4666941.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: difficult and unusual configuration..

Posted by verystrongjoe <ve...@gmail.com>.
thanks for reply.
so you mean the master/slave have to configured with only 2 brokers?

I saw this document from activemq.org ( here
<http://activemq.apache.org/jdbc-master-slave.html>  )
and i think in here they allow brokers to have more than 2.
did i misunderstand what you mean?

and how about using vm connector and putting the jdbc persistent adaptor to
each broker?



--
View this message in context: http://activemq.2283324.n4.nabble.com/difficult-and-unusual-configuration-tp4666877p4666941.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: difficult and unusual configuration..

Posted by Christian Posta <ch...@gmail.com>.
in your diagram, all four brokers cannot be live and share the same
datastore. You can set up a shared datastore using master/slave per two
brokers. That is, when broker A and B are connected to the same datastore,
broker A is master and B is slave. So when broker A dies, B can take over
where A left off.




On Fri, May 10, 2013 at 1:19 AM, verystrongjoe <ve...@gmail.com>wrote:

> I'm so stucked on configuring like the below..
> it's been for 5 days..
>
> Condition...
> 1) producer , consumer and broker is loaded on same jvm.
> 2) each producer in one server have to deliver messages to the producer of
> same server.
> 3) if one of servers is killed, I want the other server's broker to get the
> messages of killed node and execute instead of killed node.
> <http://activemq.2283324.n4.nabble.com/file/n4666877/croppercapture50.jpg>
>
> so, I'm using master-slave configuration and vm connector and jdbc
> persistent adpater.
> without using failover schema, can i share the data through the jdbc
> persistent adaptor of brokers?
>
> please give some colborate advice or hint...
> thanks in advance..
>
>
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/difficult-and-unusual-configuration-tp4666877.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



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