def _connect(self, ip_address):
# connection to RabbitMQ server
parameters = pika.ConnectionParameters(host=ip_address)
connection = pika.BlockingConnection(parameters)
channel = connection.channel()
return channel
文章目录