2 Replies Latest reply on Oct 22, 2014 12:15 AM by p18mar

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

    p18mar

      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   [/192.164.8.118:1192, /192.164.8.118:1195, /192.164.8.118:4607, /192.164.8.118:4608]

       

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

        • 1. Re: JMS : How to get list of connected client ip of particular topic or queue?
          dgrove_redhat.com

          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

            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()));