Comment 13 for bug 1609766

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.messaging (master)

Reviewed: https://review.openstack.org/365959
Committed: https://git.openstack.org/cgit/openstack/oslo.messaging/commit/?id=3f4ce9470b3f9e0502f61345a6943adad2dadac9
Submitter: Jenkins
Branch: master

commit 3f4ce9470b3f9e0502f61345a6943adad2dadac9
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>
    Closes-Bug: #1609766
    Change-Id: Id8b48df3d26675d72955d417ce7622b1e8aa6195