Description of problem:
When deleting a queue with an alternate exchange, both the primary and the backup brokers will route messages to the alt-exchange when the queue is deleted. This will cause the backups to potentially receive duplicate copies of the message if the alt-exchange is bound to a replicated queue (one set from the local route to the alt-exchange and another from the primary due to its route to the alt-exchange). Suggest that the backup brokers should not route messages to the alt-exchange when a queue is deleted.
Additionally, for auto-delete queues with an alt-exchange, upon loss of a primary, the backup brokers should not immediately start the auto-delete process. Instead, the backups should wait for the promotion of a new primary. Upon selection of the new primary, the auto-delete process can start so that the new primary will route the messages to the alt-exchange and the backups will not route the messages to the alt-exchange.
Version-Release number of selected component (if applicable):
Backup needs to receive the QMF queue delete event prior to receiving the queue's deque replication events.
Steps to reproduce:
1) Bind queue test0 to amq.fanout
2) Create queue test1 with an alt-exchange to amq.fanout
3) Send a message to test1
4) Delete queue test1
The queue test0 will have 1 message on the primary host but 2 messages on the backups
The queue test0 will have 1 message on all hosts