From e0ba5becd0052cabe0cfa997dd35d7362bf2c472 Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Sun, 14 Oct 2007 02:21:59 +0000 Subject: Enabled packed struct encoding in python, cpp, and java. Also fixed computation of required byte credit in Message.cpp. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@584474 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/python/hello-world | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'qpid/python/hello-world') diff --git a/qpid/python/hello-world b/qpid/python/hello-world index b3170c8e0c..5ba14b0fc1 100755 --- a/qpid/python/hello-world +++ b/qpid/python/hello-world @@ -3,14 +3,25 @@ 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-10-preview.xml")) +spec = qpid.spec.load("../specs/amqp.0-10-preview.xml") +client = Client("127.0.0.1", 5672, spec) client.start({"LOGIN": "guest", "PASSWORD": "guest"}) ch = client.channel(1) ch.session_open() ch.queue_declare(queue="test") ch.queue_bind(exchange="amq.direct", queue="test", routing_key="test") -print ch.queue_query(queue="test") -ch.message_subscribe(queue="test", destination="test") +#print ch.queue_query(queue="test") +ch.message_subscribe(queue="test", destination="amq.direct") +ch.message_flow("amq.direct", 0, 0xFFFFFFFF) +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["application_headers"] = {"x": 1, "y": 2, "z": "zee"} ch.message_transfer(destination="amq.direct", content=msg) +queue = client.queue("amq.direct") +msg = queue.get(timeout=10) +print msg -- cgit v1.2.1