Comment 18 for bug 1609766

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

Reviewed: https://review.openstack.org/389014
Committed: https://git.openstack.org/cgit/openstack/oslo.messaging/commit/?id=d8d564cd09ab5d4b07b6d9492b9014c024302433
Submitter: Jenkins
Branch: stable/newton

commit d8d564cd09ab5d4b07b6d9492b9014c024302433
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
    (cherry picked from commit 3f4ce9470b3f9e0502f61345a6943adad2dadac9)