5 Replies Latest reply on Jun 21, 2011 11:23 AM by ronsen

    Message stuck in the queue

    yongz

      Hi,

       

      1. JBoss.5.1.0.GA

      2. jdk1.6.0_23

      3. Hornetq 2.1.2

       

      We are having an issue where some of the messages are not delivered to its consumers(MDB). The queue is a local queue.

       

      The message works for a while, and then some messages are stuck in the queue, and it appears that no listeners are interested to them.

       

      We are not using any filters on messages.

       

      Looking at JMX console:

       

      ConsumerCountRintAttribute exposed for management
      15    
      DurableRbooleanAttribute exposed for management
      True    
      DeadLetterAddressRWjava.lang.StringAttribute exposed for management
          
      ExpiryAddressRWjava.lang.StringAttribute exposed for management
          
      MessageCountRintAttribute exposed for management
      5    
      DeliveringCountRintAttribute exposed for management
      5    

       

      There are 5 messages in the queue with DeliveringCount 5, and are not picked up.

       

      Has anyone seen this issue before and shed a light on it?

       

      Thanks a lot.

        • 1. Message stuck in the queue
          clebert.suconic

          Are you using Duplicate detection somehow?

           

          Clustering somehow?

           

           

          DuplicateDetection was cancelling the TX but not rolling it back,what could lead to deliveringCounts if you had a message being consumed while the TX was being cancelled by DuplicateDetection.

           

           

          If that's not the case we would need a testcase. It's probably fixed on 2.2 anyways.

          • 2. Message stuck in the queue
            clebert.suconic

            We are working on the release.. meanwhile maybe you could try this by building it yourself:

             

             

            http://anonsvn.jboss.org/repos/hornetq/tags/HornetQ_2_2_1_EAP_GA/

            • 3. Message stuck in the queue
              yongz

              Thanks Clebert.

               

              Are you using Duplicate detection somehow?

               

              No, we are not using duplicate detection.

               

              Clustering somehow?

               

              Yes, we are using clustering for another queue, but this queue is a local queue

               

              The interesting thing is that there seems to be a pattern: the queue works for a while, say 15-20 messages, and then message is stuck in the queue, and starts to deliver the next message again. The stuck message will not be picked by any listeners, and this behiviour really confused us.

               

              We just recently upgrade to Hornetq from JBoss messaging 1.4.6, and the code worked fine previously with JBM.

              • 4. Message stuck in the queue
                yongz

                Further this issue, one of my college found that Hornetq works differently from JBM when MDB is used.

                 

                What we observed is:

                 

                1. When the message is distributed across MDB pool(size of 15), it uses a round-robin, regardless the first thread is busy or not.
                2. In this case, even if the first MDB is busy, the message is still distributed to it, which causes the new message to stuck in the queue and wait for the running job to complete. The stuck message caused a lot grieve for us
                3. While JBM is smarter and seems choose the an idle MDB and distribute the message to it.

                 

                Can you please confirm this issue?

                • 5. Re: Message stuck in the queue
                  ronsen

                  Yes, I can confirm it. just ahving the same issue.

                  Is there any possibility to get the other workers to get the messages and deal with them??