You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Phil Brown <br...@gmail.com> on 2011/05/19 15:51:26 UTC
Number of messages in a queue.
I am fairly new to qpid and trying to learn the ropes.
>From what I understand, there is no way, through the C++ Messaging API, to
get the number of messages in a queue. How can this be done? Is there any
sample code?
Any help would be greatly appreciated!!!
Thanks!
Phil.
Re: Number of messages in a queue.
Posted by Phil Brown <br...@gmail.com>.
Hi Gordon,
Thank you for your help and the sample code!
On Thu, May 19, 2011 at 10:47 AM, Gordon Sim <gs...@redhat.com> wrote:
> On 05/19/2011 02:51 PM, Phil Brown wrote:
>
>> I am fairly new to qpid and trying to learn the ropes.
>>
>> From what I understand, there is no way, through the C++ Messaging API,
>>> to
>>>
>> get the number of messages in a queue. How can this be done? Is there
>> any
>> sample code?
>>
>> Any help would be greatly appreciated!!!
>>
>
> Querying and managing the broker is achieved by sending specially formatted
> map messages to a special address and then handling the response(s) if
> necessary.
>
> The attached example shows a simple query of a queue by name. Only the
> message depth is printed but there a range of other stats and properties in
> the response.
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
Re: Number of messages in a queue.
Posted by Pavel Moravec <pm...@redhat.com>.
> The attached example shows a simple query of a queue by name. Only the
> message depth is printed but there a range of other stats and properties
> in the response.
The list of stats and properties is e.g. written at http://qpid.apache.org/books/trunk/AMQP-Messaging-Broker-CPP-Book/html/ch02s03.html#QMFPythonConsoleTutorial-InvokingMethodsonanObject where a Python API is shown on several examples.
Kind regards,
Pavel
----- Original Message -----
From: "Gordon Sim" <gs...@redhat.com>
To: users@qpid.apache.org
Sent: Thursday, May 19, 2011 4:47:22 PM
Subject: Re: Number of messages in a queue.
On 05/19/2011 02:51 PM, Phil Brown wrote:
> I am fairly new to qpid and trying to learn the ropes.
>
>> From what I understand, there is no way, through the C++ Messaging API, to
> get the number of messages in a queue. How can this be done? Is there any
> sample code?
>
> Any help would be greatly appreciated!!!
Querying and managing the broker is achieved by sending specially
formatted map messages to a special address and then handling the
response(s) if necessary.
The attached example shows a simple query of a queue by name. Only the
message depth is printed but there a range of other stats and properties
in the response.
---------------------------------------------------------------------
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
Re: Number of messages in a queue.
Posted by Gordon Sim <gs...@redhat.com>.
On 05/19/2011 02:51 PM, Phil Brown wrote:
> I am fairly new to qpid and trying to learn the ropes.
>
>> From what I understand, there is no way, through the C++ Messaging API, to
> get the number of messages in a queue. How can this be done? Is there any
> sample code?
>
> Any help would be greatly appreciated!!!
Querying and managing the broker is achieved by sending specially
formatted map messages to a special address and then handling the
response(s) if necessary.
The attached example shows a simple query of a queue by name. Only the
message depth is printed but there a range of other stats and properties
in the response.
Re: Number of messages in a queue.
Posted by Phil Brown <br...@gmail.com>.
Hi Steve,
Thank you for your help!
On Thu, May 19, 2011 at 10:48 AM, Steve Huston <sh...@riverace.com> wrote:
> Hi Phil,
>
> > I am fairly new to qpid and trying to learn the ropes.
>
> Great - welcome!
>
> > From what I understand, there is no way, through the C++
> > Messaging API, to get the number of messages in a queue.
>
> Correct.
>
> > How can this be done? Is there any sample code?
>
> You can get this info using QMF (Qpid Management Framework). I don't
> know the mechanics offhand, but you can check the qpid-tool and/or
> qmf-tool - they're python scripts that you can use to get that info.
> Once you figure out what they're doing to get it, you can translate to
> C++.
>
> Or someone with more QMF knowledge may jump in here and shorten that
> process :-)
>
> -Steve
>
> --
> Steve Huston, Riverace Corporation
> Total Lifecycle Support for Your Networked Applications
> http://www.riverace.com
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>
RE: Number of messages in a queue.
Posted by Steve Huston <sh...@riverace.com>.
Hi Phil,
> I am fairly new to qpid and trying to learn the ropes.
Great - welcome!
> From what I understand, there is no way, through the C++
> Messaging API, to get the number of messages in a queue.
Correct.
> How can this be done? Is there any sample code?
You can get this info using QMF (Qpid Management Framework). I don't
know the mechanics offhand, but you can check the qpid-tool and/or
qmf-tool - they're python scripts that you can use to get that info.
Once you figure out what they're doing to get it, you can translate to
C++.
Or someone with more QMF knowledge may jump in here and shorten that
process :-)
-Steve
--
Steve Huston, Riverace Corporation
Total Lifecycle Support for Your Networked Applications
http://www.riverace.com
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org