def _declare(self, channel):
    if (not self._declared):
        channel.exchange_declare(exchange=self._exchange, durable=True)
        channel.queue_declare(queue=self._queue, durable=True)
        channel.queue_bind(exchange=self._exchange, queue=self._queue, routing_key=self._routing_key)
        self._declared = True
def _declare(self, channel):
    if (not self._declared):
        channel.exchange_declare(exchange=self._exchange, durable=True)
        channel.queue_declare(queue=self._queue, durable=True)
        channel.queue_bind(exchange=self._exchange, queue=self._queue, routing_key=self._routing_key)
        self._declared = True