11 lines
321 B
Python
11 lines
321 B
Python
import pika
|
|
|
|
connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))
|
|
channel = connection.channel()
|
|
|
|
channel.queue_declare(queue='ugolek')
|
|
|
|
channel.basic_publish(exchange='',routing_key='ugolek',body='Hello, My Name Alex!')
|
|
print(" [x] Отправлено 'Hello, My Name Alex!")
|
|
|
|
connection.close() |