On 28/06/2020 6:47 pm, mohank wrote:
Hi Gordon,
Thanks for your reply.
I have tried the below snippet to get the consumer Queue details, but I am
not sure whether I am doing it correctly or not.
I am not getting any exception and received response is always empty.
Sender managementSender =
session.createSender("activemq.management");
Message requestMessage;
requestMessage.setSubject("[]");
requestMessage.setProperty("_AMQ_ResourceName","DLQ");
requestMessage.setProperty("_AMQ_ConsumerCount",
"getConsumerCount");
Receiver receiver = session.createReceiver("#");
Address replyQueue = receiver .getAddress();
requestMessage.setReplyTo(replyQueue);
//requestMessage.setContent("[]");
The json needs to be sent in the body, so you want
requestMessage.setContentObject("[]");
With that change, can you turn on trace logging and examine what you get
back? (Env var QPID_LOG_ENABLE=trace+:Protocol)
managementSender.send(requestMessage);
Message ManagementResponse;
if (receiver.fetch(ManagementResponse, Duration::SECOND * 5))
{
std::string d = ManagementResponse.getContent();
Variant content =
ManagementResponse.getContentObject();
}
Thanks,
Mohan
--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org