qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Using QMF to know about consumers in a topic exchange
Date Fri, 26 May 2017 15:12:25 GMT
On 26/05/17 16:07, mottese wrote:
> Hi,
>
> Suppose I have a consumer listening to amq.topic/mySubject. Can I use QMF to
> tell if I have a consumer listening to that address? Right now I am trying
> to use a message formatted like this:
>
>     Message request;
>     request.setReplyTo(replyToAddress);
>     request.setProperty("x-amqp-0-10.app-id", "qmf2");
>     request.setProperty("qmf.opcode", "_query_request");
>     Variant::Map schemaId, content;
>     schemaId["_class_name"] = "queue";
>     schemaId["_object_name"] =
> "org.apache.qpid.broker:queue:amq.topic/mySubject";
>     content["_what"] = "OBJECT";
>     content["_object_id"] = schemaId;
>     request.setContentObject(content);
>
> Is there some way to modify this QMF request to get the information I'm
> looking for? Thanks

You need to query the bindings. The attached program will list all the 
bindings. You could modify the approach to filter out all but those 
where the exchange is "amq.topic". (You can't have the query do that 
filtering for you with QMF).


Mime
View raw message