You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Radek Kraus <rk...@gk-software.com> on 2011/11/15 10:15:35 UTC

Custom Transport - similar to Failover transport

Hello,
I running something like cluster application. I used "embedded" ActiveMQ
broker, which can run only as one instance (singleton) in whole cluster app.
If the "cluster node" with active ActiveMQ broker died, then another
ActiveMQ broker is started => so I have only one "active" instance of
ActiveMQ broker at one time (JDBC persistence).

On the "client side" I used failover transport at first (I must specify all
cluster node addresses, where ActiveMQ broker can run - failover uri). I
would like to modify "static" failover configuration (all nodes must be
present in uri) to a dynamic way. 

The first simple idea is to write the uri of active ActiveMQ broker to JNDI
(or somewhere). The client then can ask JNDI for active broker uri. 
If the connection failed, client ask JNDI for current active broker uri. For
me, it sounds as "modified" failover transport.

I want to ask if the idea to write own custom transport (based on failover
transport) is correct. Or if there is another way how to reach this goal. 

I cannot used none of "clustering" features, which is available in ActiveMQ
(Networks of brokers ...) at the moment, let say that it is a requirement to
use singleton broker in own cluster architecture.

Thanks in advance.

--
View this message in context: http://activemq.2283324.n4.nabble.com/Custom-Transport-similar-to-Failover-transport-tp4042314p4042314.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Custom Transport - similar to Failover transport

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi,

we have something similar in the progress. It uses ZooKeeper to keep a list
of available brokers.

Checkout http://fabric.fusesource.org/

especially ActiveMQ demo -
https://github.com/fusesource/fabric/tree/master/fabric-examples/fabric-activemq-demo
also, take a look at readme on how to start a broker and demo
https://github.com/fusesource/fabric/blob/master/etc/README


Regards
-- 
Dejan Bosanac - http://twitter.com/dejanb
-----------------
The experts in open source integration and messaging - http://fusesource.com
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Tue, Nov 15, 2011 at 10:15 AM, Radek Kraus <rk...@gk-software.com>wrote:

> Hello,
> I running something like cluster application. I used "embedded" ActiveMQ
> broker, which can run only as one instance (singleton) in whole cluster
> app.
> If the "cluster node" with active ActiveMQ broker died, then another
> ActiveMQ broker is started => so I have only one "active" instance of
> ActiveMQ broker at one time (JDBC persistence).
>
> On the "client side" I used failover transport at first (I must specify all
> cluster node addresses, where ActiveMQ broker can run - failover uri). I
> would like to modify "static" failover configuration (all nodes must be
> present in uri) to a dynamic way.
>
> The first simple idea is to write the uri of active ActiveMQ broker to JNDI
> (or somewhere). The client then can ask JNDI for active broker uri.
> If the connection failed, client ask JNDI for current active broker uri.
> For
> me, it sounds as "modified" failover transport.
>
> I want to ask if the idea to write own custom transport (based on failover
> transport) is correct. Or if there is another way how to reach this goal.
>
> I cannot used none of "clustering" features, which is available in ActiveMQ
> (Networks of brokers ...) at the moment, let say that it is a requirement
> to
> use singleton broker in own cluster architecture.
>
> Thanks in advance.
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Custom-Transport-similar-to-Failover-transport-tp4042314p4042314.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: Custom Transport - similar to Failover transport

Posted by Radek Kraus <rk...@gk-software.com>.
Thanks a lot. It is what I searched ... 
Now I see it in Failover Transport documentation too ... sorry I missed it
in ActiveMQ "cluster" options at first time. Thank you again.

--
View this message in context: http://activemq.2283324.n4.nabble.com/Custom-Transport-similar-to-Failover-transport-tp4042314p4043160.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Custom Transport - similar to Failover transport

Posted by Gary Tully <ga...@gmail.com>.
have a peek at https://issues.apache.org/jira/browse/AMQ-2807, it is
an implementation of your idea using a local file or any uri provider

On 15 November 2011 09:15, Radek Kraus <rk...@gk-software.com> wrote:
> Hello,
> I running something like cluster application. I used "embedded" ActiveMQ
> broker, which can run only as one instance (singleton) in whole cluster app.
> If the "cluster node" with active ActiveMQ broker died, then another
> ActiveMQ broker is started => so I have only one "active" instance of
> ActiveMQ broker at one time (JDBC persistence).
>
> On the "client side" I used failover transport at first (I must specify all
> cluster node addresses, where ActiveMQ broker can run - failover uri). I
> would like to modify "static" failover configuration (all nodes must be
> present in uri) to a dynamic way.
>
> The first simple idea is to write the uri of active ActiveMQ broker to JNDI
> (or somewhere). The client then can ask JNDI for active broker uri.
> If the connection failed, client ask JNDI for current active broker uri. For
> me, it sounds as "modified" failover transport.
>
> I want to ask if the idea to write own custom transport (based on failover
> transport) is correct. Or if there is another way how to reach this goal.
>
> I cannot used none of "clustering" features, which is available in ActiveMQ
> (Networks of brokers ...) at the moment, let say that it is a requirement to
> use singleton broker in own cluster architecture.
>
> Thanks in advance.
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Custom-Transport-similar-to-Failover-transport-tp4042314p4042314.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://fusesource.com
http://blog.garytully.com