Consumer declaration consist of the next steps:
1) declare an exchange
2) declare a queue
3) bind the queue to the exchange
Due to reply exchanges are auto-delete, at the
step 3 the exchange can be removed and consumer.declare()
will raise `queue.bind 404 Exchange not found`.
So, in this case the queue is exist and AMQPListener
just call consumer.consume() on the queue and go to
drain_events() despite on the fact that the queue is
unbound.
This change tries to redeclare queue/exchange proactively
each times channel change and just before consuming messages.
Co-Authored-By: Mehdi Abaakouk <email address hidden>
Closes-Bug: #1609766
Change-Id: Id8b48df3d26675d72955d417ce7622b1e8aa6195
Reviewed: https:/ /review. openstack. org/365959 /git.openstack. org/cgit/ openstack/ oslo.messaging/ commit/ ?id=3f4ce9470b3 f9e0502f61345a6 943adad2dadac9
Committed: https:/
Submitter: Jenkins
Branch: master
commit 3f4ce9470b3f9e0 502f61345a6943a dad2dadac9
Author: kbespalov <email address hidden>
Date: Thu Aug 4 15:18:25 2016 +0300
Fix consuming from unbound reply queue
Consumer declaration consist of the next steps:
1) declare an exchange
2) declare a queue
3) bind the queue to the exchange
Due to reply exchanges are auto-delete, at the
step 3 the exchange can be removed and consumer.declare()
will raise `queue.bind 404 Exchange not found`.
So, in this case the queue is exist and AMQPListener
just call consumer.consume() on the queue and go to
drain_events() despite on the fact that the queue is
unbound.
This change tries to redeclare queue/exchange proactively
each times channel change and just before consuming messages.
Co-Authored-By: Mehdi Abaakouk <email address hidden> d72955d417ce762 2b1e8aa6195
Closes-Bug: #1609766
Change-Id: Id8b48df3d26675