<div dir="ltr"><div><br></div><div><br>I believe the port number shown on rabbitmq console (see below) is the client port. This shows different IP and port is being used by the new connection.<br></div><div><br>Consumers<br>
Channel     Consumer tag     Ack required     Exclusive<br><a href="http://210.19.225.88:36920" target="_blank">210.19.225.88:36920</a> (1)     amq.ctag-ma8QOXnZ_UAK-<div dir="ltr">R7wddQGXA     ●     ○<br><a href="http://210.19.225.3:60659" target="_blank">210.19.225.3:60659</a> (1)     amq.ctag-igoa2WysTs79WAk969UFJg     ●     ○<br>
<br><br></div>I manage to reconnect from the same device on a different IP by disconnecting from a Wifi router and connecting to another Wifi router. I think this is a very common scenario including switching from 3G network to Wifi network.   <br>
<br></div>--Nick<br><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 4, 2013 at 4:11 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On nov 4, 2013, at 5:24 AM, L H, Wong &lt;<a href="mailto:lhwong@gmail.com">lhwong@gmail.com</a>&gt; wrote:<br>

<br>
&gt; I am wondering why if IP for first and second connections are the same (in the scenarios in which the connection lost and resumed almost immediately via same network) the first connection gets closed almost immediately after the second connection was established.<br>

<br>
I don’t have an immediate answer but IP connections are not identified by IP’s. They are<br>
identified by a tuple of {protocol, client IP, client port, server IP, server port}.<br>
<br>
Unless Android tries to be smart and reuse ports in their TCP/IP stack implementation,<br>
client ports should be ephemeral (randomly taken from a pool of tens of thousands<br>
available ports).<br>
<br>
May I ask how you manage to reconnect from the same device on a different IP?<br>
--<br>
MK<br>
<br>
Software Engineer, Pivotal/RabbitMQ<br>
<br>
</blockquote></div><br></div></div>