<div dir="ltr">Hi Marutha,<div><br></div><div>Am getting amqp connection exception after using <span style="font-family:arial,sans-serif;font-size:13px"> </span><span style="font-family:arial,sans-serif;font-size:13px">xxx.xxx.xxx.xxx:5720 address - </span>o<b>rg.springframework.amqp.AmqpConnectException: java.net.ConnectException.</b></div>
<div><br></div><div>Below is the connection factory code at producer and consumer end and these running in window 7 local machine. ANd HAProxy is installed in other machine in LAN and we have enabled 5720 port.</div><div>
<br></div><div><div>CachingConnectionFactory connectionFactory = new CachingConnectionFactory(</div><div><span class="" style="white-space:pre">                                </span>"<span style="font-family:arial,sans-serif;font-size:13px">xxx.xxx.xxx.xxx</span>");</div>
<div><span class="" style="white-space:pre">                </span>connectionFactory.setUsername("guest");</div><div><span class="" style="white-space:pre">                </span>connectionFactory.setPassword("guest");</div><div>
<span class="" style="white-space:pre">                </span>connectionFactory.setPort(5670);</div></div><div><br></div><div>Thanks in advance.</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 6, 2013 at 3:04 PM, Maruthavanan Subbarayan <span dir="ltr"><<a href="mailto:marutha.tech@gmail.com" target="_blank">marutha.tech@gmail.com</a>></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">You should be using xxx.xxx.xxx.xxx:5720 and haproxy will tkae care if configured</p>
<p dir="ltr">Thanks<br>
Marutha</p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Nov 6, 2013 2:27 PM, "Rajasekhar P" <<a href="mailto:sekhar434145@gmail.com" target="_blank">sekhar434145@gmail.com</a>> 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 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 style="white-space:pre-wrap">                                </span>"xxx.xxx.xxx.xxx");<br><br>(OR)<br><br><div>CachingConnectionFactory connectionFactory = new CachingConnectionFactory();</div>
<div>connectionFactory.setAddresses("ip_addr2:5672,ip_addr2:5672");</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"><<a href="mailto:marutha.tech@gmail.com" target="_blank">marutha.tech@gmail.com</a>></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><div>
<div class="gmail_quote">On Nov 6, 2013 10:55 AM, "Rajasekhar P" <<a href="mailto:sekhar434145@gmail.com" target="_blank">sekhar434145@gmail.com</a>> 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"><<a href="mailto:mklishin@gopivotal.com" target="_blank">mklishin@gopivotal.com</a>></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 <<a href="mailto:sekhar434145@gmail.com" target="_blank">sekhar434145@gmail.com</a>> wrote:<br>
<br>
> 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>
> 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" 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><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>