You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by yannanlu <ya...@turner.com> on 2012/10/12 23:49:40 UTC
how to query a single object with QMF2?
With the example java code, I am able to query a full list of queue objects
from a C++ broker. Is there a way to query just a list of names for all the
queues without their detailed attributes?
How can I query just one object if I know the queue name? Where to look up
the _objectId for a known queue?
Thanks,
Yannan
--
View this message in context: http://qpid.2158936.n2.nabble.com/how-to-query-a-single-object-with-QMF2-tp7583228.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: how to query a single object with QMF2?
Posted by Fraser Adams <fr...@blueyonder.co.uk>.
Hi Yannan
I wrote a pretty complete Java Implementation of the QMF2 API which you
can get from the Jira 3675 linked here.
https://issues.apache.org/jira/browse/QPID-3675
I've got absolutely no idea if this has made it into Qpid proper, it's
marked down as assigned to Ted Ross.
Unfortunately I've had no feedback on this and my only mechanism for
doing anything with it is via the Jira.
I must admit that I'm a little bit frustrated, I put a load of effort
into it and I'm simply not sure if there's any take up. I'm not aware of
any other Java implementation of the QMF2 API though there are a few
examples of basic QMF2 protocol Map Message passing out there.
To answer your question there is no way to just get the queue names
without getting the QmfData Map objects. Basically you initially have to
do getObjects("queue") - or the low-level protocol equivalent.
However once you have retrieved the queue objects you can go through
them looking for the one with the name that you want (the "name"
property IIRC).where you
Once you've found that you can get the _object_id from it (it's just a
property) and given that then you can then do a query based on the
_object_id
In the QMF2 API the refresh() method on a QmfConsoleData Object does
just that - but you need to have done an initial getObjects to get the list.
Technically there's another way - using the API you can set up a "query
subscription" can pass the queue name as part of the query and get the
updates pushed to you. The broker (at least up to 0.12, which is what
I'm currently using) doesn't actually support the query subscription
part of the API so I actually emulated it within the Console itself (if
a query subscription is added the Console subscribes to object updates
and applies the required filters).
FWIW there's one fairly notable bug in my implementation, basically if
there are more than 100 management objects the broker sends partial
updates. The version I've posted to the Jira doesn't support this,
though the version I'm working on does (I've tested with 1000's of
connections, queues etc.)
I've not posted any updates 'cause I'm working on some fancy new
features. Primarily I'm writing a fancy HTML5 web UI to enable full
management and monitoring of potentially multiple brokers. It's working
on browsers from IE6 to mobile safari. There's still a fair bit to do
(I'm working on adding queues remotely at the moment). In support of the
Web UI I've been writing a full REST API around the QMF2 API.
I'd like to think all of this might be useful to someone, It's been over
a year of weekends including the original QMF2 API development, but the
apparent lack of interest is leaving me a little demotivated - I'm
mainly carrying on because it's useful to me, there aren't any other
really good UIs for Qpid/QMF that I'm aware of.
Regards,
Frase
On 12/10/12 22:49, yannanlu wrote:
> With the example java code, I am able to query a full list of queue objects
> from a C++ broker. Is there a way to query just a list of names for all the
> queues without their detailed attributes?
>
> How can I query just one object if I know the queue name? Where to look up
> the _objectId for a known queue?
>
> Thanks,
>
> Yannan
>
>
>
> --
> View this message in context: http://qpid.2158936.n2.nabble.com/how-to-query-a-single-object-with-QMF2-tp7583228.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org