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.