0 Replies Latest reply on Oct 22, 2014 7:08 AM by P S

    JMS : How to get list of connected client ip of particular topic or queue?

    P S Newbie

      I am able to list all connected remote address with topic and queue.But I am not able to print which IP is connected to Which queue or topic.


      Topics     :->[pkjFParmTest_1]

      Queues     :->[ExpiryQueue, DLQ, pkjFParmTestQ_1]

      Connection Ids   :->[1043999491, 1425966224]

      Remote Addr   [/, /, /, /]


      How can I distinguish or print connected Remote address with topic and queue separately?


      Below is code to execute output:

      JMXServiceURL url = new JMXServiceURL( "service:jmx:rmi:///jndi/rmi://" + ""+ ":" + 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()));