rabbitmq / rabbitmq-amqp1.0

AMQP 1.0 support for RabbitMQ
https://www.rabbitmq.com/
Other
93 stars 20 forks source link

Queue Reconnect on different host is not working #16

Closed VsVarun closed 9 years ago

VsVarun commented 9 years ago

Hi Team, Reconnecting to the queue after restart is not happening. Let me tell you the infrastructure we have. RabbitMQ is installed in host A. Worker using amqp client is installed in host B. We have a durable queue REQUEST.

1. Now assume there are 100 messages in the queue and the client in host B is already connected and processing the messages, ie it is able to consume the messages.
2. Now to test durability we stopped RABBITMQ SERVICE which is running in host A.
3. Now the client in host B got the connection disconnected as the queue broker is shutdown.
4. When it fails the client keeps retrying to get the connection back, so the moment rabbitmq server comes up, it will get an connection.
5. Now the client is retrying...
6. We started the RABBITMQ SERVICE in host A.
7. Now the client in host B got a connection, declared the queue, and got binded to the exchange.
8. When the client tries to consume a message the amqp connection is terminated by the rabbitmq broker in host A.

Note: this is not the behaviour if we have the amqp client and rabbitmq in the same host.
          The reconnect works well if it is in the same machine...it fails it if is in a different host when we try to reconnect.
         During reconnect we always open a new factory connection.

          kindly let us know if this is an issue and if there is any work around.
          let me know if you need any further information.

Thanks & Regards, Varun

michaelklishin commented 9 years ago

Please post questions to the mailing list and specify versions used, what's in the log file and a code sample that demonstrates what you use.