6 Replies Latest reply on Jun 19, 2009 6:33 AM by Marek Neumann

    Metrics in JBoss Messaging.

    sahana l Newbie

      I have written code on Glassfish server to listen to JMS monitoring topics like mq.metrics.destination_list. Is there any way that i can do it in JBoss messaging(jboss-messaging-1.4.0.SP3)? should i use only JMX?

      Thanks in advance.

        • 1. Re: Metrics in JBoss Messaging.
          Yong Hao Gao Master

          Hi, I don't think JBM 1.4 has built-in monitoring topics. I think you can use JMX.

          • 2. Re: Metrics in JBoss Messaging.
            Marek Neumann Novice

            JMX is the way to go. There are only very few monitoring metrics in 1.4 so I decided to intercept the calls via AOP and aggregate them into a separate mbean. This is fairly simple.

            • 3. Re: Metrics in JBoss Messaging.
              Tim Fox Master

              JBM 2.0 has management notifications (I guess this is what you mean by "monitoring metrics").

              I'd be interested in what specific notifications would be of interest to you so we can ensure we have them in JBM 2.0

              • 4. Re: Metrics in JBoss Messaging.
                Marek Neumann Novice

                What I was interested in (and what I implemented) was the current message throughput (incoming and outgoing messages) because we use the clustered messaging server as an asynchronous backend for other applications. Also general message counters and the current registered message listeners are interesting.

                • 5. Re: Metrics in JBoss Messaging.
                  sahana l Newbie

                  Hi, thanks for the replies, sorry for replying late, postphoned this work until the completion of another job.

                  I want the number of active producers/consumers and message rate on each topic and metrics on memory as well.

                  @mlange

                  what is AOP? Can you please elaborate this?

                  "to intercept the calls via AOP and aggregate them into a seperate mbean"

                  • 6. Re: Metrics in JBoss Messaging.
                    Marek Neumann Novice

                    AOP is a technology to implement cross-cutting concerns and it is heavily used in JBM 1.4. I simply used the existing classes (some of them are precompiled with aopc) and added an interceptor. This one is called before/after the method call. Using this the message rate (incoming/outgoing) or the registered listeners can be easily recognized. The MBean is used for the data collection, so the values can be monitored from there using JMX. If you are interested I can provide the code - fairly simple but effective stuff. Unfortunately JBM itself (at least in 1.4) does not provide useful metrics.