import pika connection = pika.BlockingConnection(pika.ConnectionParameters('localhost')) channel = connection.channel() channel.queue_declare(queue='bitrix24') channel.basic_publish(exchange='', routing_key='bitrix24', body='Hello, B24!') connection.close