<div dir="ltr">See my comment on StackOverflow; your test case is printing the initial results of calling getHost() before creating the listener. It has nothing to do with which host you are currently connected to.<div><br>
</div><div>Turn on DEBUG logging and you will see the switch.<br><div><br></div><div><a href="http://stackoverflow.com/questions/19226986/rabbitmq-cluster-fail-over-issue?noredirect=1#comment28477266_19226986">http://stackoverflow.com/questions/19226986/rabbitmq-cluster-fail-over-issue?noredirect=1#comment28477266_19226986</a><br>
</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 8, 2013 at 1:14 AM, Rajasekhar P <span dir="ltr">&lt;<a href="mailto:sekhar434145@gmail.com" target="_blank">sekhar434145@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"><div dir="ltr"><div>Please find the steps for my experiment -</div><div>I have stopped rabbit1 using &quot;C:\Program Files\RabbitMQ Server\rabbitmq_server-3.1.3\sbin&gt;rabbitmqctl stop_app&quot; command.</div>
<div><br></div>
<div>here rabbit1 - one machine name and running one rabbitmq node</div><div>and rabbit2 - is one more machine name running one rabbitmq node.</div><div><br></div><div>And my producer and consumer codes are sitting in rabbit1 machine. please let me know if you need any details on the same. Thank you.</div>

<div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Tue, Oct 8, 2013 at 10:35 AM, Michael Klishin <span dir="ltr">&lt;<a href="mailto:michael@rabbitmq.com" target="_blank">michael@rabbitmq.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div><br>
On oct 8, 2013, at 8:39 a.m., Rajasekhar P &lt;<a href="mailto:sekhar434145@gmail.com" target="_blank">sekhar434145@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Yes, initially it is connected to rabbit1 but after stopping this node it has to connect to rabbit2 node which is one of the node in the cluster right?<br>
<br>
</div>Correct. Can you be more specific about how you stop a node, though? Do you completely<br>
terminate RabbitMQ process (e.g. kill it)?<br>
<div><br>
&gt; So, here am confusing what is the reason for not connecting to rabbit2 node?<br>
<br>
</div>Not sure. Can you put together a small app that can be used to reproduce the problem?<br>
<br>
Thank you.<br>
<span><font color="#888888"><br>
MK<br>
<br>
<br>
<br>
</font></span><br></div></div><div class="im">_______________________________________________<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></div></blockquote></div><br></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>