-
1. Re: JMS : How to get list of connected client ip of particular topic or queue?
dgrove_redhat.com Oct 21, 2014 1:32 PM (in response to p18mar)How are you generating your current connection list?
I don't recognize that output.
- Doug
-
2. Re: JMS : How to get list of connected client ip of particular topic or queue?
p18mar Oct 22, 2014 12:15 AM (in response to dgrove_redhat.com)Below is code to execute output:
Topics :->[pkjFParmTest_1]
Queues :->[ExpiryQueue, DLQ, pkjFParmTestQ_1]
Connection Ids :->[1043999491, 1425966224]
Remote Addr [/192.164.8.118:1192, /192.164.8.118:1195, /192.164.8.118:4607, /192.164.8.118:4608]
JMXServiceURL url = new JMXServiceURL( "service:jmx:rmi:///jndi/rmi://" + "192.164.8.118"+ ":" + 1090 + "/jmxrmi" );
JMXConnector connector = JMXConnectorFactory.connect( url );
MBeanServerConnection server = connector.getMBeanServerConnection();
ObjectName objectName = ObjectNameBuilder.DEFAULT.getJMSServerObjectName();
JMSServerControl controller = (JMSServerControl) JMX.newMBeanProxy(server,objectName,JMSServerControl.class,true );
System.out.println("Topics :->"+Arrays.asList(controller.getTopicNames()));
System.out.println("Queues :->"+Arrays.asList(controller.getQueueNames()));
System.out.println("Conn Ids :->"+Arrays.asList(controller.listConnectionIDs()));
System.out.println("Remote Addr:->"+Arrays.asList(controller.listRemoteAddresses()));