diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2007-11-07 20:46:36 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2007-11-07 20:46:36 +0000 |
| commit | 2e82ef59003f607e7ceea3442c423b4fc70001b9 (patch) | |
| tree | 9b6e2f7a65a747417ba12a6d3d42d0ceb37fad28 /qpid/python/hello-world | |
| parent | 2e45c6ba10c0a5b2100197fc33472eea5df5ba05 (diff) | |
| download | qpid-python-2e82ef59003f607e7ceea3442c423b4fc70001b9.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@592888 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/hello-world')
| -rwxr-xr-x | qpid/python/hello-world | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/qpid/python/hello-world b/qpid/python/hello-world index 5ba14b0fc1..d419fd988b 100755 --- a/qpid/python/hello-world +++ b/qpid/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") |
