From 5b6ca65abd333e0ea15790ec351bfb67a7013a5e Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Thu, 18 Jan 2007 17:56:44 +0000 Subject: made message-transfer return a result, switched over message delivery to use message-transfer, added a generated .copy() to method bodies, and made hello-world acknowledge the message it sends to itself git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@497515 13f79535-47bb-0310-9956-ffa450edef68 --- python/hello-world | 5 +++++ python/qpid/client.py | 3 +++ 2 files changed, 8 insertions(+) (limited to 'python') diff --git a/python/hello-world b/python/hello-world index fd712d324b..823e395b2e 100755 --- a/python/hello-world +++ b/python/hello-world @@ -12,3 +12,8 @@ ch.queue_bind(exchange="amq.direct", queue="test", routing_key="test") ch.message_consume(queue="test", destination="test") ch.message_transfer(destination="amq.direct", routing_key="test", body="hello world") +msg = client.queue("test").get() +print msg +msg.ok() +import time +time.sleep(3) diff --git a/python/qpid/client.py b/python/qpid/client.py index 3083cd4933..34d7790c39 100644 --- a/python/qpid/client.py +++ b/python/qpid/client.py @@ -100,6 +100,9 @@ class ClientDelegate(Delegate): msg.tune_ok(*msg.frame.args) self.client.started.set() + def message_transfer(self, ch, msg): + self.client.queue(msg.destination).put(msg) + def basic_deliver(self, ch, msg): self.client.queue(msg.consumer_tag).put(msg) -- cgit v1.2.1