Comment 4 for bug 1609766

Revision history for this message
shen.zhixing (fooy5460) wrote :

I downloaded kombu-3.0.29 and kombu-4.0.0, there are "self.exchange.declare(nowait)" and "queue_bind" in function "queue.declare()";

So I wonder why this happen, do you know why the exchange is not created ?

2016-08-03 13:34:39.163 1217066 ERROR oslo_messaging._drivers.amqpdriver File "/usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/impl_rabbit.py", line 296, in declare
2016-08-03 13:34:39.163 1217066 ERROR oslo_messaging._drivers.amqpdriver self.queue.declare()

kombu-3.0.29:
class Queue(MaybeChannelBound):
...
    def declare(self, nowait=False):
        """Declares the queue, the exchange and binds the queue to
        the exchange."""
        # - declare main binding.
        if self.exchange:
            self.exchange.declare(nowait)
        self.queue_declare(nowait, passive=False)

        if self.exchange and self.exchange.name:
            self.queue_bind(nowait)

        # - declare extra/multi-bindings.
        for B in self.bindings:
            B.declare(self.channel)
            B.bind(self, nowait=nowait)
        return self.name

kombu-4.0.0:
class Queue(MaybeChannelBound):
    def declare(self, nowait=False):
        """Declares the queue, the exchange and binds the queue to
        the exchange."""
        if not self.no_declare:
            # - declare main binding.
            self._create_exchange(nowait=nowait)
            self._create_queue(nowait=nowait)
            self._create_bindings(nowait=nowait)
        return self.name