Give me a example, please.<div><br></div><div>Can I try this example on Java Client Library:</div><div><br></div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>ConnectionFactory�factory = new ConnectionFactory();</div>
<div><div>Address[] addresses = {new Address(&quot;localhost&quot;, 12345), new Address(&quot;localhost&quot;, 12346)};</div><div>factory.newConnection(addresses);</div></div><div><br></div><div>If I&#39;ll do this, how can I know what node of cluster I&#39;m connected?</div>
<div><br></div><div>If node 1 down, but node 2 still up, how can I reconnect in node 1?</div><div><br></div><div>Thanks Emile.</div><div><br></div><div>Regards.</div><div><br clear="all">Lucas Ap. Souza<br><br>
<br><br><div class="gmail_quote">On 16 March 2011 06:43, Emile Joubert <span dir="ltr">&lt;<a href="mailto:emile@rabbitmq.com">emile@rabbitmq.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Lucas,<br>
<br>
On 15/03/11 21:34, Lucas Souza wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi everybody...<br>
<br>
How can I connect in a cluster using Java client library?<br>
</blockquote>
<br>
A rabbit client (including the Java client) will work unchanged whether connecting to single or a clustered broker. When connecting to a cluster, it makes little difference which node in the cluster a client connects to (except for queue declarations).<br>

<br>
You should take a look at the clustering guide for instructions on how to set up a cluster using the rabbitmqctl commandline utility:<br>
<a href="http://www.rabbitmq.com/clustering.html" target="_blank">http://www.rabbitmq.com/clustering.html</a><br>
<br>
Regards<br><font color="#888888">
<br>
Emile<br>
<br>
</font></blockquote></div><br></div>