On 22/06/2020 11:59 am, mohank wrote:
Client : QPID C++
Broker : ActiveMQ Artemis
Is there any possibility to check whether *topic address*/*queue* has any
consumer?
Using Artemis.cmd, JMS and rest API provided by ActiveMQ we can get this
data.
But is it possible to get the same using QPID C++ APIS(i.e. QMF, is it only
restricted to manage QPID broker or we can manage other brokers like
ActiveMQ Artemis)
QMF is a message based protocol for management of the qpid c++ broker
and will not help with artemis.
However artemis has its own message based protocol for invoking
management operations, which you can use over AMQP with any client API.
I'm not sure if that protocol is actually documented anywhere (you could
ask on activemq user list).
The basics are that you send requests to 'activemq.management' with
application properties '_AMQ_ResourceName' and '_AMQ_OperationName' used
to identify the particular call you are making. The body of the message
is a JSON string representign the parameters to the call. You should set
up a receiver for replies and set the reply-to on the request in order
to get them.
Responses will have application property '_AMQ_OperationSucceeded' set
to indicate success. If it succeeds, any response values will be encoded
as JSON string in the body. If not you may get an error message in the
body I think.
E.g. I believe to get the number of consumers on a queue named foo, you
would send a request with _AMQ_ResourceName set to queue.foo and
_AMQ_OperationName set to getConsumerCount and the body set to '[]'
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org