distributed-computing/tasks/yudenicheva-ds/lab_4/python4Lab/Tut1/send.py

11 lines
306 B
Python

import pika
connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))
channel = connection.channel()
channel.queue_declare(queue='Logs')
channel.basic_publish(exchange='',routing_key='yudenicheva',body='Hello')
print(" [x] Отправлено сообщение")
connection.close()