summaryrefslogtreecommitdiff
path: root/python/hello-world
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2007-11-07 20:46:36 +0000
committerRafael H. Schloming <rhs@apache.org>2007-11-07 20:46:36 +0000
commitc9900041bf70ac76a4eb8753965fe24426ba8cd4 (patch)
tree9f8f4d8e54358a59e6f86cf70db15fb37c26ca90 /python/hello-world
parent710b8a1f1285b9aa5bccee5b1906500667dd7bc5 (diff)
downloadqpid-python-c9900041bf70ac76a4eb8753965fe24426ba8cd4.tar.gz
added factory for structs, and made default spec loading based on AMQP_SPEC environment variable
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@592888 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/hello-world')
-rwxr-xr-xpython/hello-world7
1 files changed, 2 insertions, 5 deletions
diff --git a/python/hello-world b/python/hello-world
index 5ba14b0fc1..d419fd988b 100755
--- a/python/hello-world
+++ b/python/hello-world
@@ -3,8 +3,7 @@ import qpid
from qpid.client import Client
from qpid.content import Content
-spec = qpid.spec.load("../specs/amqp.0-10-preview.xml")
-client = Client("127.0.0.1", 5672, spec)
+client = Client("127.0.0.1", 5672)
client.start({"LOGIN": "guest", "PASSWORD": "guest"})
ch = client.channel(1)
ch.session_open()
@@ -17,9 +16,7 @@ ch.message_flow("amq.direct", 1, 0xFFFFFFFF)
msg = Content("hello world")
msg["content_type"] = "text/plain"
msg["routing_key"] = "test"
-msg["reply_to"] = spec.struct("reply_to")
-msg["reply_to"].exchange_name = "asdf"
-msg["reply_to"].routing_key = "fdsa"
+msg["reply_to"] = client.structs.reply_to("asdf", "fdsa")
msg["application_headers"] = {"x": 1, "y": 2, "z": "zee"}
ch.message_transfer(destination="amq.direct", content=msg)
queue = client.queue("amq.direct")