summaryrefslogtreecommitdiff
path: root/qpid/python/hello-world
blob: b05873dff3b9db50c697debe0954d1621cdf8953 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python
import qpid
from qpid.client import Client
from qpid.content import Content

client = Client("127.0.0.1", 5672, qpid.spec.load("../specs/amqp.0-9.xml"))
client.start({"LOGIN": "guest", "PASSWORD": "guest"})
ch = client.channel(1)
ch.channel_open()
ch.message_transfer(destination="amq.direct", routing_key="asdf",
                    body="hello world")