def get_connection(): params = pika.ConnectionParameters(host=_RABBIT_MQ_HOST) connection = pika.BlockingConnection(params) return connection