def get_consumers(self, consumer, channel):
exchange = Exchange(exchange_name, type="topic", durable=True)
queue = Queue(queue_name, exchange, routing_key=routing_key, durable=True)
return [consumer(queue, callbacks=[self.on_message])]
评论列表
文章目录