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
(cherry picked from commit 3f4ce9470b3f9e0502f61345a6943adad2dadac9)
Reviewed: https:/ /review. openstack. org/389190 /git.openstack. org/cgit/ openstack/ oslo.messaging/ commit/ ?id=b90580653af 33678d9931f3330 8edee31cf1fe54
Committed: https:/
Submitter: Jenkins
Branch: stable/mitaka
commit b90580653af3367 8d9931f33308ede e31cf1fe54
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 502f61345a6943a dad2dadac9)
Closes-Bug: #1609766
Change-Id: Id8b48df3d26675
(cherry picked from commit 3f4ce9470b3f9e0