<div dir="ltr">Thanks Marutha for the reply. Here, HAProxy is running on xxx.xxx.xxx.xxx machine and listening port is 5720 . While getting the connection at producer and consumer end, do we need to use this ip address or IP addresses where RabbitMQ nodes are running in cluster?�<br>
<br><div>CachingConnectionFactory connectionFactory = new CachingConnectionFactory(</div><div><span class="" style="white-space:pre">                                </span>&quot;xxx.xxx.xxx.xxx&quot;);<br><br>(OR)<br><br><div>CachingConnectionFactory connectionFactory = new CachingConnectionFactory();</div>
<div>connectionFactory.setAddresses(&quot;ip_addr2:5672,ip_addr2:5672&quot;);</div></div><div><br></div><div><br></div><div>Thanks in advance.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 6, 2013 at 11:03 AM, Maruthavanan Subbarayan <span dir="ltr">&lt;<a href="mailto:marutha.tech@gmail.com" target="_blank">marutha.tech@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hi</p>
<p dir="ltr">The load balancing should be taken care by HAproxy. Both producers and consumers should point to HAproxy.</p>
<p dir="ltr">Thanks<br>
Marutha</p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Nov 6, 2013 10:55 AM, &quot;Rajasekhar P&quot; &lt;<a href="mailto:sekhar434145@gmail.com" target="_blank">sekhar434145@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Thanks for the response. We are new to using HAProxy and done the HAProxy setup as per the Rabbit_In_Action.pdf documentation. Here, HAProxy is installed in Linux and two RabbitMQ nodes are running in two different windows machines in cluster.�<div>


<br></div><div>If we are not making any changes related to HAProxy in producer and consumer code, how does load balancing will work. could you please tell me?�</div><div><br></div><div>Thank you.</div></div><div class="gmail_extra">


<br><br><div class="gmail_quote">On Tue, Nov 5, 2013 at 6:44 PM, Michael Klishin <span dir="ltr">&lt;<a href="mailto:mklishin@gopivotal.com" target="_blank">mklishin@gopivotal.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><br>
On 5 Nov 2013, at 17:10, Rajasekhar P &lt;<a href="mailto:sekhar434145@gmail.com" target="_blank">sekhar434145@gmail.com</a>&gt; wrote:<br>
<br>
&gt; We are using HAProxy as a load balancer in RabbitMQ cluster and we have done the configuration and able to see the stats, where it will display list of running nodes.<br>
&gt; But, we want to know how to configure for connecting producer and consumers and we working on Java client. Could anyone please share the sample producer and consumer code which we can test via HAProxy load balancer.<br>



<br>
</div>The whole point of having a proxy is that clients don�t need to be aware of the cluster topology.<br>
<br>
Your clients should connect to HAproxy. There is no difference to connecting to a Rabbit node directly.<br>
<br>
MK<br>
<br>
Software Engineer, Pivotal/RabbitMQ<br>
<br>
<br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
</blockquote></div><br></div>
<br>_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
<br></blockquote></div>
</div></div><br>_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
<br></blockquote></div><br></div>