7 Replies Latest reply on Mar 13, 2009 6:58 AM by mielket

    Some times it has delay when receving messages

    shkumesh

      some times it  has some delay when receiving messages from queues . This is mostly happens in high traffic time(if input to queues are very high)  .Now we are doing daily restart of active mq . So now this is not happening ,But if did not restart more than one or two days then it will happen this issue .We are using *version 5.1*

       

      I think this some thing memory related issue in active mq ( Memory releasing ) . We are also using consumers .

       

      Following is the xml file we are using :

       

       

       

          <!--

           

        • Lets deploy some Enterprise Integration Patterns inside the ActiveMQ Message Broker

           

        • For more details see

          **

           

          -->

           

       

       

      Can some one help to me ?

        • 1. Re: Some times it has delay when receving messages
          mielket

          How large is the delay that you encounter? Does it only affect the consumers? Does it affect all consumers or just one particular consumer.

          You mentioned this problem only happens under high load. Can you give some indications as to how high the load would be?

          Also, in addition to your activemq.xml config do you use any other ActiveMQ features such as message selectors, priority queues, or anything else?

          • 2. Re: Some times it has delay when receving messages
            shkumesh

            this was happened only for some consumers ,mostly when we try to get messages from high load queues  . load is about 50 to 120 messages per second .

             

             

            We are using priority queues , But with out priority queues this was happened

            • 3. Re: Some times it has delay when receving messages
              mielket

              >some times it has some delay when receiving messages from queues .

               

              How do you monitor the delay? By looking at the rate at which an individual consumer receives messages? Of what magnitude is the delay? Do you expect all consumers to consume at the same rate?

              Do all your consumers connect to the same broker instance?  How many consumers are typically connected to the high load queues? Does only a subset of these consumers show a delay or all consumers that are connected to a high load queue?

               

              >But with out priority queues this was happened.

              Does it happen irrespective of using priority queues? Do you use message selectors to realize priority queues as outlined here?

              • 4. Re: Some times it has delay when receving messages
                shkumesh

                We have 2 brokers,we dnt expect each consumer to consume at same rat,Activemq should send messages at the rate of each consumer ,each consumer has different rate ,depending on rate they do the processing

                We are also using  prefetch sizes .Are there any particular way of adjusting that ?.

                We have used like that

                queue : consumer

                 

                Issue happens when consuming becomes slow ,then it never recovers,consuming becomes slow .. because of internal processing delays .To resolve this we have to restart active mq .

                • 5. Re: Some times it has delay when receving messages
                  mielket

                  I am not sure I really understand the issue. Have you done any monitoring or logging to verify that this is an issue in the broker? You mentioned restarting the broker solves the problem but from what I read so far I am wondering if this could also be an issue in the consumer?

                  Can you isolate the problem in a testcase by any chance?

                  You can configure the prefetch size as explained here.

                   

                  So are you saying that once a consumer gets a bit slower (because of processing time in the consumer itself) it never speeds up again? Are you sure this is not a consumer issue? Generally the broker will send prefetchLimit number of messages to a consumer in one go, then waiting for acks before sending more messages. I don't see how this should slow down the consumer.

                  • 6. Re: Some times it has delay when receving messages
                    shkumesh

                    I think this is related to active mq memory releasing . Because when we restarting it will clear all the used memory, then only it working correctly. Are there any method to release unused queue memory in active mq .

                    • 7. Re: Some times it has delay when receving messages
                      mielket

                      Have you used tools like JConsole to check for an increasing memory consumption inside ActiveMQ? I am not aware of any memory leaks in this regards.

                      I am not sure how to bring this issue any further without getting more precise information as to where exactly the problem is. If you could narrow down the problem to a particular area and provide supporting measurements or figures that would be of help. Ideally a testcase the reproduces the problem would be of tremendous help.