distributed-computing/tasks/klementeva-ja/lab_4/python4Lab/Tut1/send.py

11 lines
325 B
Python
Raw Normal View History

2023-12-16 11:47:24 +04:00
import pika
connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))
channel = connection.channel()
channel.queue_declare(queue='klementeva')
channel.basic_publish(exchange='',routing_key='klementeva',body='My name is Zhanna Klementeva from ISEbd-41!')
print("Отправлено")
connection.close()