[rabbitmq-discuss] previous connection is NOT automatically closed if IP different

Liong Hung Wong lhwong at gmail.com
Sat Nov 2 05:31:26 GMT 2013


According to http://www.rabbitmq.com/reliability.html,
"Connection Failures
In the event of a connection failure, the client will need to establish a 
new connection to the broker. Any channels opened on the previous 
connection will have been automatically closed and these will need 
re-opening too." 

I manage to establish a new connection to the broker, however, if the IP of 
the new connection is different from previous connection (for example, via 
different networks such as 3G and Wifi network or via different router) the 
previous connection will not be closed until the heartbeat timeout (default 
is 600s). 

Channel     Consumer tag     Ack required     Exclusive (1)     amq.ctag-ma8QOXnZ_UAK-R7wddQGXA     ●     ○ (1)     amq.ctag-igoa2WysTs79WAk969UFJg     ●     ○

Due to that the new connection or channel created is not able to receive 
all of the messages delivered to the queue. The new connection only 
receives alternate message until previous connection is closed.
For example, M1, M2, M3, M4 published to the queue, new connection only 
receives M2, M4 within the 600s; after the previous connection is closed 
the new connection will get M1 and M3. 

If the IP is the same, the previous connection does get closed immediately. 
New connection will get M1, M2, M3, and M4.

I am jusing rabbitmq-java client. is this a bug? 

What can I do to ensure that I can receive all of the messages immediately 
even in the scenario in which IP is different? 

--Wong Liong Hung
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131101/e7f6b1a5/attachment.htm>

More information about the rabbitmq-discuss mailing list