You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2008/06/10 20:08:59 UTC
svn commit: r666244 - /incubator/qpid/trunk/qpid/python/hello-world
Author: rhs
Date: Tue Jun 10 11:08:59 2008
New Revision: 666244
URL: http://svn.apache.org/viewvc?rev=666244&view=rev
Log:
updated hello-world
Modified:
incubator/qpid/trunk/qpid/python/hello-world
Modified: incubator/qpid/trunk/qpid/python/hello-world
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/hello-world?rev=666244&r1=666243&r2=666244&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/hello-world (original)
+++ incubator/qpid/trunk/qpid/python/hello-world Tue Jun 10 11:08:59 2008
@@ -14,17 +14,19 @@
# publish a message
dp = ssn.delivery_properties(routing_key="test-queue")
mp = ssn.message_properties(content_type="text/plain")
-msg = Message(dp, "Hello World!")
+msg = Message(dp, mp, "Hello World!")
ssn.message_transfer(message=msg)
# subscribe to a queue
-ssn.message_subscribe(queue="test-queue", destination="messages")
+ssn.message_subscribe(destination="messages", queue="test-queue",
+ accept_mode=ssn.accept_mode.none)
incoming = ssn.incoming("messages")
# start incoming message flow
incoming.start()
# grab a message from the queue
+
print incoming.get(timeout=10)
# cancel the subscription and close the session and connection