Hi Gordan,
I am using following code to get the list of connections. However, I
found it gives me only first 100 connections. When I use "qpid-stat" it
shows me all the connections even beyond 100. What's wrong with this code?
int main(int argc, char** argv)
{
Connection c("127.0.0.1:5672");
try {
c.open();
Session session = c.createSession();
Address
responses("qmf.default.topic/direct.amqpagent;{node:{type:topic},
link:{x-declare:{auto-delete:True,exclusive:True}}}");
Receiver r = session.createReceiver(responses);
Sender s = session.createSender("qmf.default.direct/broker");
Message request;
request.setReplyTo(responses);
request.setSubject("broker");
request.setContentType("amqp/map");
request.setProperty("x-amqp-0-10.app-id", "qmf2");
request.setProperty("qmf.opcode", "_query_request");
request.setProperty("method", "request");
Variant::Map oid;
Variant::Map content;
oid["_class_name"] = "connection";
content["_what"] = "OBJECT";
content["_schema_id"] = oid;
encode(content, request);
s.send(request);
Message response = r.fetch();
Variant::List contentIn;
decode(response, contentIn);
for(Variant::List::iterator it = contentIn.begin(); it !=
contentIn.end(); it++) {
Variant::Map details = it->asMap()["_values"].asMap();
std::cout << details << std::endl;
}
session.acknowledge();
} catch(const std::exception& error) {
std::cout << "ERROR: " << error.what() << std::endl;
}
c.close();
return 0;
}
--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]