11 lines
326 B
Python
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() |