distributed-computing/tasks/nasybullov-ai/lab_4/python4Lab/Tut1/send.py
2024-01-09 17:57:58 +03:00

11 lines
326 B
Python

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