From 75f598b22ea4573cff2d47fdd689b85cee5dd88d Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Tue, 4 Mar 2008 20:03:09 +0000 Subject: 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 --- python/hello-010-world | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 python/hello-010-world (limited to 'python/hello-010-world') 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) -- cgit v1.2.1