qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Ross <tr...@redhat.com>
Subject Re: New Feature Announce - Java QMF2 API Implementation.
Date Wed, 04 Jan 2012 13:53:09 GMT

Sorry for my delayed response to this.  I've fallen a little behind on 
the users list.

Thank you for this contribution.  From your description, it looks as 
though it's a little ahead of the C++ counterpart!  A Java 
implementation of QMF2 is very desirable and valuable so it should find 
its way into the code base so it can become part of the released software.

I'm going to send an email to dev and users later today to propose that 
we separate QMF from the Qpid namespace (i.e. consider QMF to be a 
separate and layered capability that adds value to Qpid) and it looks 
like your Java implementation should be included as well.


On 12/11/2011 10:52 AM, Fraser Adams wrote:
> Hello All,
> By way of giving something back to the Qpid community I've (finally) 
> got my implementation of the QMF2 API (which for those not already 
> familiar is described here 
> https://cwiki.apache.org/qpid/qmfv2-api-proposal.html) into a form 
> that is hopefully generally usable.
> It's taken a bit longer than I'd have liked, but I've spent the time 
> adding some example tools that are based on the API. Hopefully these 
> tools are useful, at the very least they provide a fair illustration 
> of the QMF2 API including such things as method invocation and Query 
> Subscription.
> There's quite a lot of if (just short of 100 classes including tests 
> and tools) so I've zipped it up and attached it to a Jira.
> https://issues.apache.org/jira/browse/QPID-3675
> Note that there are some quirks, especially if you use a version of 
> Qpid < 0.12. Older versions require a patch to allow the app-id 
> property name to be set. The patch is included in the distro and the 
> shell scripts that launch the tests and tools add the patch jar to the 
> front of the class path. I've tested with Qpid 0.8, 0.10 and 0.12.
> Note too that some of the features won't work with Qpid 0.8. In 
> particular the QMF2 create and delete methods weren't added until Qpid 
> 0.10 so the add queue/add binding etc. features of QpidConfig won't 
> work with Qpid 0.8, similarly for QpidCtrl.
> The code contains a fair amount of comment and JavaDoc so hopefully is 
> should be fairly easy to use.
> I certainly can't guarantee it'll be bug free :-D but I've tried 
> reasonably hard to break things, so at the very least it should be 
> robust enough to be usable. ConnectionAudit and QpidQueueStats seem to 
> reconnect and survive broker restarts pretty well.
> This is the first release of a QMF2 API Implementation for Java.
> Features:
>    * Full Implementation of QMF2 Console, Agent and AgentExternal.
>    * Supports QMF2 Query Subscriptions on Agent/AgentExternal
>      implementations.
>    * Emulates QMF2 Query Subscriptions on the Console side for the
>      broker ManagementAgent by
>      intercepting _data indications and filtering against QmfQuery.
>      This is necessary as the
>      ManagemetAgent doesn't yet support QMF2 style Query Subscriptions.
>    * Console supports Agent discovery via findAgent() method, which can
>      support partial matches,
>      which is useful because the full Agent name has a UUID
>      representing the "instance" so it's hard
>      to know the full name.
>    * QmfQuery supports regex matching.
>    * Supports QMF2 WorkItem Event model and in addition supports an
>      alternative QmfEventListener
>      Event model, which is rather more like the JMS MessageListener 
> model.
> Example Tools Provided:
>    * ConnectionAudit: Audits connections to one or more Qpid message
>      brokers against a whitelist.
>    * ConnectionLogger: A QMF2 class used to provide information about
>      connections made to a broker.
>    * QpidConfig: QpidConfig is a fairly "literal" Java port of the
>      python qpid-config tool. Uses pure
>      QMF2 for adding/deleting queues, exchanges & bindings this
>      provides useful illustration of how
>      to do these things using the ManagementAgent method calls.
>    * QpidCtrl: A tool to allow QMF2 methods to be invoked from the
>      command line.
>    * QpidPrintEvents: Collect and print events from one or more Qpid
>      message brokers.
>    * QpidQueueStats: Collect and print queue statistics. This is a
>      rewrite of the Python version and
>      illustrates the use of QuerySubscriptions (via the Console side
>      emulation)to subscribe to
>      objects on the ManagementAgent.
>    * QueueFuse: QueueFuse provides protection to message producers from
>      consumers who can't consume
>      messages fast enough.
> A couple of utility classes are provided too:
>    * GetOpt: Is an implementation of the Python GetOpt, which makes
>      command line parsing a bit less of a pain.
>    * ConnectionHelper: Provides support for a variety of different URL
>      formats. As it happens the C++ AMQP URL, the Java ConnectionURL
>      and the Python tool "BrokerURL" are all slightly different.
>      ConnectionHelper tries to support them all as well as a prototype
>      for the proposed new AMQP URL
>      https://cwiki.apache.org/qpid/url-format-proposal.html. It's
>      obviously still possible to create JMS Connections for QMF2 via
>      JNDI, but ConnectionHelper makes it a bit easier for command line
>      based tools where we may want to connect to lots of different
>      broker instances.
> I hope that this is useful, I certainly find it useful as I need to do 
> a lot with broker management info.
> It'll be really nice if this makes it into an official Qpid release at 
> some point.
> Enjoy!!
> Best Regards,
> Frase
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org

Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org

View raw message