I am testing the following scenario in Spring AMQP v1.4.2 and it fails to reconnect after a network disruption:
I just ran your test as described (rabbit on linux using iptables
to drop packets).
There is no log when the connection is reestablished (perhaps we should).
I suggest you turn on debug logging to see the reconnection.
EDIT:
From the rabbitmq documentation:
exclusive Exclusive queues may only be accessed by the current connection, and are deleted when that connection closes. Passive declaration of an exclusive queue by other connections are not allowed.
From your exception:
reply-code=405, reply-text=RESOURCE_LOCKED - cannot obtain exclusive access to locked queue 'e4288669-2422-40e6-a2ee-b99542509273' in vhost '/', class-id=50, method-
So the problem is the broker still thinks the other connection exists.
requestedHeartbeat
so the broker will detect the lost connection faster.