I'm trying to retrieve the queue size of a given queue using jolokia interface of ActiveMQ. My queue name is /some/queue
and because of the slashes I can't get the API to work correctly.
Here's what I tried:
curl -XGET --user admin:admin "http://localhost:8161/api/jolokia/read/org.apache.activemq:brokerName=localhost,destinationName=/some/queue,destinationType=Queue,type=Broker/QueueSize" | python -m json.tool
curl -XGET --user admin:admin "http://localhost:8161/api/jolokia/read/org.apache.activemq:brokerName=localhost,destinationName=%2Fsome%2Fqueue,destinationType=Queue,type=Broker/QueueSize" | python -m json.tool
One with not encoded /
and the other with encoded to %2F
, both queries return javax.management.InstanceNotFoundException
.
When I try to retrieve other queues it works. When I do destinationName=*
it lists my queue:
"org.apache.activemq:brokerName=localhost,destinationName=/some/queue,destinationType=Queue,type=Broker": {
"QueueSize": 0
},
How should I encode /
in jolokia queries?