Gate_B24YAT/rabbitmq/send.py

15 lines
306 B
Python
Raw Permalink Normal View History

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