Last active
September 27, 2016 11:03
-
-
Save lulf/f76bb8b6da0bf373be69d2e0990e462f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.locator = ActiveMQClient.createServerLocator(String.format("tcp://%s:%s", mgmtEndpoint.hostName(), mgmtEndpoint.port())); | |
this.sessionFactory = locator.createSessionFactory(); | |
this.session = sessionFactory.createSession(); | |
ClientRequestor requestor = new ClientRequestor(session, "jms.queue.activemq.management"); | |
ClientMessage message = session.createMessage(false); | |
ManagementHelper.putOperationInvocation(message, address, "listAllSubscriptionsAsJSON"); | |
session.start(); | |
ClientMessage reply = requestor.request(message); | |
String retVal = (String)ManagementHelper.getResult(reply); | |
session.stop(); | |
return retVal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"queueName":"helloclient:helloclient","clientID":null,"selector":null,"name":"helloclient:helloclient","durable":true,"messageCount":0,"deliveringCount":0,"consumers":"[{\"consumerID\":0,\"connectionID\":\"1771513900\",\"sessionID\":\"1c67e2eb-84a1-11e6-8605-44850066eaf9\",\"browseOnly\":false,\"creationTime\":1474973818275}]"}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment