When dynamic federation was configured using an existing queue, it was possible for the bindings on the source exchange to become out-of-sync with the destination exchange if there was an interruption in the bridge (for example: connectivity loss, session error, etc). An unbind event occurred on the destination exchange while the bridge was detached.
Normally, dynamic federation would utilize an auto-delete queue for the bridge queue. The missing unbind events were inconsequential because the queue would be deleted upon bridge interruption. However, using dynamic federation with an existing queue, it was possible the queue would not be auto-deleted. In this scenario, when the connection was interrupted, the queue stayed alive and the bindings were never deleted.
This behavior caused the propagated queue bindings to exist beyond their intended lifetime, and interfere with the creation of future propagated bindings. The fix tracks the state of propagated bindings for each Session, and ensures that propagated bindings are torn down properly. Dynamic bindings are now deleted, even when the connection over which the binding was created is interrupted. The broker has no stale dynamic bindings to interfere with the creation of new federated routes when the federation cycle is restarted.
Description of problem:
When dynamic federation is configured using an existing queue, it is possible for the bindings on the source exchange to become out-of-sync with the destination exchange if there is an interruption in the bridge (i.e. connectivity loss, session error, etc) and an unbind event occurs on the destination exchange while the bridge is detached.
Normally dynamic federation would utilize an auto-delete queue for the bridge queue, so the missing unbind events are inconsequential since the queue would be deleted upon an interruption in the bridge. However, using dynamic federation with an existing queue allows full control over the queue properties and enables support for message acks and is therefore highly desirable.
Version-Release number of selected component (if applicable):
Qpid 0.18
How reproducible:
100%
Steps to Reproduce:
1. Create a bridge queue on the source broker
2. Create a dynamic federated route between a destination broker exchange and source broker exchange, using the existing bridge queue
3. Create a binding on the destination exchange to propagate the binding to the source exchange
4. Disconnect the source and destination brokers
5. While source and destination brokers are disconnected, unbind the previously created binding
Actual results:
The binding is never removed on the source exchange
Expected results:
The binding is removed on the source exchange either when the bridge was initially lost or shortly after the source and destination bridges reconnect
Additional info:
Created attachment 641618[details]
Patch to auto-unbind propagated bindings when destination broker disconnects
Patch also addresses need described in QPID-3777
This issue was discovered in a development build. In hindsight, this issue therefore does not require Release Notes because a customer would never have encountered this issue. Removing from 3.0 Release Notes.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHEA-2014-1296.html