4 Replies Latest reply on Sep 13, 2005 4:06 PM by Daniel Abramovich

    Tracking down MQ Threads

    Daniel Abramovich Newbie

      This is JBoss 3.2.6, Java 1.4.2

      While debugging an issue, we did a thread dump on our application and noticed approximately 240 UIL2 ReadTask/WriteTask thread pairs. 116 pairs are associated w/ port 8093, which I would assume would represent our JMS queues and topics. 118 pairs are associated w/ some higher user port, which look like they would represent client subscriptions. Since those numbers seems very high for our application I looked at the jmx-console for more detail. We have a total (including the DLQ) of 12 topics/queues. Across all of the topics/queues, we have a total of 12 subscriptions/receivers. However, the DestinationManager MBean reports a ClientCount of 126.

      Can anyone help me interpret this? What is the difference (and perhaps why the discrepancy) between the # of clients and subscriptions/receivers? How can we track down where all these threads are coming from?


        • 1. Re: Tracking down MQ Threads
          Elias Ross Master

          The client count should immediately decrease after a client has properly closed its connection. You can turn on tracing (use the tracing interceptor) to verify that for every open, you have a corresponding close.

          • 2. Re: Tracking down MQ Threads
            Andreas Skoog Newbie

            Could you elaborate this? How exactly can you perform such a trace?


            • 3. Re: Tracking down MQ Threads
              Elias Ross Master

              Keywords: log4j, jboss logging, tracing interceptor

              • 4. Re: Tracking down MQ Threads
                Daniel Abramovich Newbie

                Finally got around to doing some tracing - I turned on the TRACE logging for the TraceInterceptor. I can see subscriptions and unsubsciptions being logged.

                The problem is that the ID identifing any particular subscription are bogus - always -2147483648 which is min int. Based on this information, it's not possible to correlate subscribes with the unsubscribes, so I can't see what's not being closed. Ideas?

                2005-09-13 15:24:19,727 Thread-27528 TRACE [org.jboss.mq.server.TracingInterceptor] CALLED : subscribe
                2005-09-13 15:24:19,727 Thread-27528 TRACE [org.jboss.mq.server.TracingInterceptor] ARG : Subscription[subId=-2147483
                648 destination=TOPIC.FMLiveEventChangeTopic messageSelector=(JMSType = 'Updated' OR JMSType = 'Deleted' OR JMSType = 'N
                ew') AND (DeviceType='SOLARIS' ) Local Create]

                2005-09-13 15:26:19,304 Thread-27555 TRACE [org.jboss.mq.server.TracingInterceptor] CALLED : unsubscribe
                2005-09-13 15:26:19,304 Thread-27555 TRACE [org.jboss.mq.server.TracingInterceptor] ARG : -2147483648
                2005-09-13 15:26:19,305 Thread-27555 TRACE [org.jboss.mq.server.TracingInterceptor] RETURN : unsubscribe