diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2008-03-04 20:03:09 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2008-03-04 20:03:09 +0000 |
| commit | 75f598b22ea4573cff2d47fdd689b85cee5dd88d (patch) | |
| tree | 964aa4463e2140c5040dd36137a49ab9c261f19a /python/hello-010-world | |
| parent | 24435b9c62976e0a4c0857f86057d3c93389b79f (diff) | |
| download | qpid-python-75f598b22ea4573cff2d47fdd689b85cee5dd88d.tar.gz | |
import of in-process 0-10 final python client
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@633610 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/hello-010-world')
| -rwxr-xr-x | python/hello-010-world | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/python/hello-010-world b/python/hello-010-world new file mode 100755 index 0000000000..7685af8fd3 --- /dev/null +++ b/python/hello-010-world @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +from qpid.connection010 import Connection +from qpid.spec010 import load +from qpid.util import connect +from qpid.datatypes import Message + +spec = load("../specs/amqp.0-10.xml") +conn = Connection(connect("0.0.0.0", spec.port), spec) +conn.start(timeout=10) + +ssn = conn.session("my-session") + +ssn.queue_declare("asdf") + +ssn.message_transfer("this", None, None, Message("testing...")) +ssn.message_transfer("is") +ssn.message_transfer("a") +ssn.message_transfer("test") + +print ssn.queue_query("testing") + +ssn.close(timeout=10) +conn.close(timeout=10) |
