Menu Search

helloworld_blocking.py

from proton import Message
from proton.utils import BlockingConnection

conn = BlockingConnection("localhost:5672")
receiver = conn.create_receiver("examples")
sender = conn.create_sender("examples")
sender.send(Message(body="Hello World!"))
msg = receiver.receive(timeout=30)
print(msg.body)
receiver.accept()
conn.close()

Download this file