diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2008-06-10 18:08:59 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2008-06-10 18:08:59 +0000 |
| commit | dba2ac60fa67c418fe8f93eafbf33404affb5703 (patch) | |
| tree | ee9d8c151125f0ac0a0945b6c93c94e075f5dfa3 /qpid/python | |
| parent | 06e1426e91903056871d693aab9049f203b7b330 (diff) | |
| download | qpid-python-dba2ac60fa67c418fe8f93eafbf33404affb5703.tar.gz | |
updated hello-world
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@666244 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
| -rwxr-xr-x | qpid/python/hello-world | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/qpid/python/hello-world b/qpid/python/hello-world index cfcaa962d7..5d513cc57b 100755 --- a/qpid/python/hello-world +++ b/qpid/python/hello-world @@ -14,17 +14,19 @@ ssn.queue_declare("test-queue") # 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 |
