Hi, I'm using the Qpid 1.36 C++ client and I'm trying to use QMF to get
information about how many producers/consumers a queue has. Currently, I can
get how many consumers a queue has by using this request:

    request.setReplyTo(receiver.getAddress());
    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:" + queueName;
    content["_what"] = "OBJECT";
    content["_object_id"] = schemaId;
    request.setContentObject(content);

And then doing this to get the number of consumers:

    Variant::List list = response.getContentObject().asList();
    Variant::Map item = list.begin()->asMap();
    Variant::Map values = item["_values"].asMap();
    int consumers = values["consumerCount"];

How can I modify this to get the number of producers? I tried subbing
consumerCount for producerCount but then values["producerCount"] returned a
void, even though in my test I know I had a sender set up.

Thanks




--
View this message in context: 
http://qpid.2158936.n2.nabble.com/Using-QMF-to-get-information-about-consumers-producers-tp7659741.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to