summaryrefslogtreecommitdiff
path: root/python/hello-world
diff options
context:
space:
mode:
Diffstat (limited to 'python/hello-world')
-rwxr-xr-xpython/hello-world11
1 files changed, 11 insertions, 0 deletions
diff --git a/python/hello-world b/python/hello-world
new file mode 100755
index 0000000000..b05873dff3
--- /dev/null
+++ b/python/hello-world
@@ -0,0 +1,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")