From users-return-3304-apmail-qpid-users-archive=qpid.apache.org@qpid.apache.org Thu Oct 07 17:57:32 2010 Return-Path: Delivered-To: apmail-qpid-users-archive@www.apache.org Received: (qmail 37405 invoked from network); 7 Oct 2010 17:57:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Oct 2010 17:57:32 -0000 Received: (qmail 3116 invoked by uid 500); 7 Oct 2010 17:57:32 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 3077 invoked by uid 500); 7 Oct 2010 17:57:31 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 3069 invoked by uid 99); 7 Oct 2010 17:57:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Oct 2010 17:57:31 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of woogie@eseri.com designates 209.44.123.242 as permitted sender) Received: from [209.44.123.242] (HELO mail1.eseri.net) (209.44.123.242) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Oct 2010 17:57:24 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail1.eseri.net (Postfix) with ESMTP id 57F26360D1 for ; Thu, 7 Oct 2010 13:57:03 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at tane.serv.eseri.net Received: from mail1.eseri.net ([127.0.0.1]) by localhost (tane.serv.eseri.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pHP4XbKwEg0E for ; Thu, 7 Oct 2010 13:57:03 -0400 (EDT) Received: from hera.team.eseri.net (hera.team.eseri.net [10.101.1.31]) by mail1.eseri.net (Postfix) with ESMTP id DDDA3360CC for ; Thu, 7 Oct 2010 13:57:02 -0400 (EDT) Received: from [10.101.1.50] (chaos.team.eseri.net [10.101.1.50]) by hera.team.eseri.net (Postfix) with ESMTPSA id 86EE81B22B9 for ; Thu, 7 Oct 2010 13:57:02 -0400 (EDT) DomainKey-Signature: a=rsa-sha1; s=mail; d=eseri.com; c=simple; q=dns; b=7FTRZl4abhu828+MnIW9RLOOA8AwuNM7fZLlaKPsfAWFnmkJ8qYPZBdXsdKVdx10d J3XURDaeJ9gMIV1aoGn5bzpF/Prh66nr/Qe0sd/UQnch0HkzrcaNKEbreZzzcDEIYmt 8aXgL+OtfK11v2PkjPYdZes4gIKQAuWUqzzK3o4= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=eseri.com; s=mail; t=1286474222; bh=unA/vV7LA3krYv6x6zPTsjiin1RCbW0Gwdc0cugd6E8=; h=Subject:From:Reply-To:To:Content-Type:Date:Message-Id: Mime-Version:Content-Transfer-Encoding; b=tAkdmwj12Lc9ML0HrCaRp6N2 NvK5OSy+Dv7j1pv+GdudodrfGpuFhUMa+HjI5tFBp9Z3QJb6bUzzD7QEzYlUrG+J2Ju fe4T2pk9TtuIxAJ0bMxYlhI/IVe5aIF+bOKNXkJnT8TaVOKzXCFs4zzllvF5UInqhSV wIentlYLhNSCA= Subject: Difficulties with QMFv2 Python bindings From: Wolgemuth Greg Reply-To: woogie@eseri.com To: users@qpid.apache.org Content-Type: text/plain Organization: Eseri Date: Thu, 07 Oct 2010 13:57:02 -0400 Message-Id: <1286474222.7059.57.camel@chaos.team.eseri.net> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I'm working with a build from SVN trunk, and am trying to use the Python QMFv2 bindings. I've been starting with the example provided (agent.py), and then moving on to try and get a functional console, but have had some difficulties. First, the agent example as provided fails to function correctly, and outputs the following: 2010-10-07 21:52:22 warning Exception received from broker: not-found: not-found: Queue not found: qmf.default.direct (qpid/broker/SessionAdapter.cpp:752) [caused by 2 \x08:\x01] Traceback (most recent call last): File "./example_agent.py", line 145, in agent = ExampleAgent("fed1.lab.eseri.net") File "./example_agent.py", line 47, in __init__ self.session.open() File "/usr/lib/python2.6/site-packages/qmf2.py", line 229, in open self._impl.open() File "/usr/lib/python2.6/site-packages/cqmf2.py", line 246, in open def open(self): return _cqmf2.AgentSession_open(self) RuntimeError: Queue qmf.default.direct does not exist Segmentation fault I've tried looking through the qmf2.py source to understand how to create a Console, and came up with this as a simple proof of concept: import cqpid from qmf2 import * connection = cqpid.Connection("fed1.lab.eseri.net") connection.open() myconsole = ConsoleSession(connection) myconsole.open() print myconsole.getAgents() When run, it outputs the following: 2010-10-07 21:50:15 warning Exception received from broker: not-found: not-found: Exchange not found: qmf.default.direct (qpid/broker/ExchangeRegistry.cpp:90) [caused by 2 \x07:\x01] Traceback (most recent call last): File "./console.py", line 24, in myconsole.open() File "/usr/lib/python2.6/site-packages/qmf2.py", line 166, in open self._impl.open() File "/usr/lib/python2.6/site-packages/cqmf2.py", line 314, in open def open(self): return _cqmf2.ConsoleSession_open(self) RuntimeError: Exchange qmf.default.direct does not exist I found that by using the messaging library, I can create the "qmf.default.direct" and "qmf.default.topic" exchanges by hand before opening the console session, and the console appears to work (although getAgents never returns any values) However, if I then run the agent example, with the qmf exchanges created by the console, I get this output instead: ./example_agent.py Traceback (most recent call last): File "./example_agent.py", line 145, in agent = ExampleAgent("broker.example.org") File "./example_agent.py", line 47, in __init__ self.session.open() File "/usr/lib/python2.6/site-packages/qmf2.py", line 229, in open self._impl.open() File "/usr/lib/python2.6/site-packages/cqmf2.py", line 246, in open def open(self): return _cqmf2.AgentSession_open(self) RuntimeError: Ambiguous address, please specify queue or topic as node type Segmentation fault It seems like my difficulties are centred around not having the qmf.default.* exchanges set up correctly. Am I wrong in thinking that the QMF libraries ought to be declaring/asserting these exchanges automatically, the same way the QMF queues are created? If not, I'd appreciate a couple of lines I could use with the messaging API to create the exchanges with the correct options/settings. Greg --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:users-subscribe@qpid.apache.org