distributed-computing/tasks/grenaderova-aa/lab_4/python4Lab/Tut1/send.py
2023-12-18 16:32:53 +04:00

11 lines
351 B
Python

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