distributed-computing/tasks/dunaev-oi/lab4/Tut1/send.py

11 lines
341 B
Python
Raw Normal View History

2023-12-18 16:44:22 +04:00
import pika
connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))
channel = connection.channel()
channel.queue_declare(queue='dunaev')
channel.basic_publish(exchange='',routing_key='dunaev',body='Hello, my name is Oleg, i am from ISEbd-41!')
print(" [x] Отправлено сообщение")
connection.close()