Dynamic discovery for client libraries

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Dynamic discovery for client libraries

master.zakharov
Hello

I'd like to evaluate the approach with failover and dynamic discovery of ActiveMQ brokers for "client" libraries, i.e. not the one using the ActiveMQConnection, e.g. some libraries for MQTT protocol.

For ActiveMQConnection's I may use the "failover://" protocol and in case of "updateClusterClients=true" option, the client need to know only about one broker to connect to.

And how it can be achieved e.g. for MQTT?

Are there some system topic the client can subscribe to and be notified about some broker in the cluster become (un)available? I checked the documentation for Advisory messages, but there are no messages related to cluster changes.

And even if such topic exists, how can I get the initial list of brokers in the cluster?

I hope the dynamic discovery is feasible, and someone could give me the reference to the documentation or code samples.

Thanks in advance,
Konstantin
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic discovery for client libraries

Noel OConnor
I may be wrong but I don't think the MQTT wire protocol facilitates the
passing of broker cluster details to clients. AMQP has the same limitation.

Take a look at the gateway feature of fabric8, this may help you get around
this  https://github.com/jboss-fuse/fuse/blob/master/docs/gateway.md


On Wed, May 21, 2014 at 11:40 PM, master.zakharov <[hidden email]
> wrote:

> Hello
>
> I'd like to evaluate the approach with failover and dynamic discovery of
> ActiveMQ brokers for "client" libraries, i.e. not the one using the
> ActiveMQConnection, e.g. some libraries for MQTT protocol.
>
> For ActiveMQConnection's I may use the "failover://" protocol and in case
> of
> "updateClusterClients=true" option, the client need to know only about one
> broker to connect to.
>
> And how it can be achieved e.g. for MQTT?
>
> Are there some system topic the client can subscribe to and be notified
> about some broker in the cluster become (un)available? I checked the
> documentation for Advisory messages, but there are no messages related to
> cluster changes.
>
> And even if such topic exists, how can I get the initial list of brokers in
> the cluster?
>
> I hope the dynamic discovery is feasible, and someone could give me the
> reference to the documentation or code samples.
>
> Thanks in advance,
> Konstantin
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Dynamic-discovery-for-client-libraries-tp4681303.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic discovery for client libraries

master.zakharov
Noel, thanks for the info about fabric8, will check it out.

What regarding the MQTT - do not know as well whether it is feasible within the protocol to pass the clustering info. But I do not limit the scenario to MQTT only, it was only as example of let's say external client.

What do I want to achieve is to accomplish the dynamic discovery, manage it explicitly, and do not introduce a gateway/load-balancer in front of broker.

So I wonder what ActiveMQ could provide here. Beside from Advisory messages I checked the JMX interface of ActiveMQ:
 - I can receive the number of brokers in the cluster - brokers are establish tcp connection between each other (clientConnectors / tcp / clientId / ...)
 - but for the moment this info is not enough for dynamic discovery, because that info does not contain the info about available connectors for specific transport/protocol

And I did not found the exhaustive documentation for ActiveMQ JMX.
http://activemq.apache.org/jmx.html - only overview
http://apache.apache.org/maven/activemq-core/apidocs/org/apache/activemq/broker/jmx/package-summary.html - 404

Thanks,
Konstantin

Reply | Threaded
Open this post in threaded view
|

Re: Dynamic discovery for client libraries

ceposta
Then you have to manage the discovery parts yourself. You can look here:

http://activemq.apache.org/discovery.html

There is also an http discovery mechanism.

Fabric8 handles this for you.


On Mon, May 26, 2014 at 1:31 AM, master.zakharov
<[hidden email]>wrote:

> Noel, thanks for the info about fabric8, will check it out.
>
> What regarding the MQTT - do not know as well whether it is feasible within
> the protocol to pass the clustering info. But I do not limit the scenario
> to
> MQTT only, it was only as example of let's say external client.
>
> What do I want to achieve is to accomplish the dynamic discovery, manage it
> explicitly, and do not introduce a gateway/load-balancer in front of
> broker.
>
> So I wonder what ActiveMQ could provide here. Beside from Advisory messages
> I checked the JMX interface of ActiveMQ:
>  - I can receive the number of brokers in the cluster - brokers are
> establish tcp connection between each other (clientConnectors / tcp /
> clientId / ...)
>  - but for the moment this info is not enough for dynamic discovery,
> because
> that info does not contain the info about available connectors for specific
> transport/protocol
>
> And I did not found the exhaustive documentation for ActiveMQ JMX.
> http://activemq.apache.org/jmx.html - only overview
>
> http://apache.apache.org/maven/activemq-core/apidocs/org/apache/activemq/broker/jmx/package-summary.html
> - 404
>
> Thanks,
> Konstantin
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Dynamic-discovery-for-client-libraries-tp4681303p4681393.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



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