[rabbitmq-discuss] How can I connect in a cluster using Java library

Lucas Souza lucasas at gmail.com
Wed Mar 16 15:20:29 GMT 2011

Thanks Emile, and to finish... :D

Wheter I want connecting in 4 nodes of the cluster, I need to have 4
connection, one per node, that's it?

I dont see any benefits in the client side if I have to do this
process. Am I wrong?

Thank so much Emile.


On 16 mar, 12:12, Emile Joubert <em... at rabbitmq.com> wrote:
> Hi Lucas,
> On 16/03/11 14:46, Lucas Souza wrote:
> > But, I'm exploring the source code of rabbitmq java client library and
> > saw the classhttps://github.com/rabbitmq/rabbitmq-java-client/blob/master/src/com/...
> > In this class when I send multiples addresses, it connect in only one.
> > What node adress should I send to newConnection method?
> If you are connecting to single broker then use setHost() and
> newConnection(). If you are connecting to a cluster then can do the
> same, using the address of any of the cluster nodes, or you can use
> newConnection(Address[]), where the parameter is an array of cluster
> node addresses.
> > Sorry if I'm wrong, but I understand that if I send a address of a
> > node valid, the connection returned is always references this node.
> Yes.
> Regards
> Emile
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

More information about the rabbitmq-discuss mailing list