def __init__(self, exchangeName, host='localhost', port=5672):
self._exchangeName = exchangeName
self._connection = pika.BlockingConnection(pika.ConnectionParameters(host=host, port=port))
self._channel = self._connection.channel()
self._channel.exchange_declare(exchange=exchangeName, type='direct')
评论列表
文章目录