4 Replies Latest reply on May 14, 2012 7:41 AM by varsha.g

    Why HornetQ showing the - ve Number of messages added to queue.

    varsha.g

      Hi,

                I'm using jboss-as-7.1.2.Final-SNAPSHOT (Downloaded from https://ci.jboss.org/hudson/view/All/job/JBoss-AS-7.x-latest/ build  #950 08 May 2012 12:52:24 AM Which uses the hornetQ version HornetQ 2.2.16.Final ). and I've deployed my application which have MDB.

                I examine the Queue from  adminconsole --- > jms destination ---> queue.

                It have the Record for the Messages in Queue, In Delivery, Messages Added, etc.

       

               The issues was  why I'm getting the ....

                     1)  Messages in Queue is a -ve number.

                     2)  There shoud never - ve number of message are added in queue.

       

                     I'm writting the message on disk. By Configuring

       

      <address-setting match="#">

                    <dead-letter-address>jms.queue.DLQ</dead-letter-address>

              <expiry-address>jms.queue.ExpiryQueue</expiry-address>

              <redelivery-delay>0</redelivery-delay>

              <max-size-bytes>1048576</max-size-bytes>

              <page-size-bytes>104857</page-size-bytes>

              <address-full-policy>PAGE</address-full-policy>

              <message-counter-history-day-limit>10</message-counter-history-day-limit>

      </address-setting>

       

               To remove this i've restarted the jboss. There is no effect.

       

              Is any one goen through the same problem?

              Now how should I remove it?

              Should I need to remove it from the default pagging directory? But is this feasible ?

       

                      Also I've attached the image for the same. Please have look on it.

       

      Thanks in Advance.

        • 1. Re: Why HornetQ showing the - ve Number of messages added to queue.
          clebert.suconic

          Since we cannot count messages in page mode, we add a counter on the journal and control it individually.

           

          Did you do anything different such as remove pages, lots of rollbacks or anythng like that? Can you replicate this with empty data?

           

          If you can replicate this it will be a matter on finding out why the counter got out of sync on paging.

          • 2. Re: Why HornetQ showing the - ve Number of messages added to queue.
            varsha.g

            I have not removed any pages.

            I have loaded the 100000 messages to queue. server blocked for a while due to some reason .

            After this I've restared the server. 

            Once the message is received by mdb, that object must removed from the disk (Its default directory)

             

             

            how to get a reliable counter value ?

            should we not use PAGE?

            That means if we use PAGE we need to have our own counter as the Hornet counter could be wrong even negative.

            • 3. Re: Why HornetQ showing the - ve Number of messages added to queue.
              clebert.suconic

              It should be reliable already..

               

              You're hitting some bug... if you replicate it in an example we can fix it.

               

              Please try the latest version first.

              • 4. Re: Why HornetQ showing the - ve Number of messages added to queue.
                varsha.g

                Hi Clebert,

                        I'm using jboss-as-7.1.2.Final-SNAPSHOT (Downloaded from https://ci.jboss.org/hudson/view/All/job/JBoss-AS-7.x-latest/ build  #950 08 May 2012 12:52:24 AM Which uses the hornetQ version HornetQ 2.2.16.Final ).

                 

                      How should i remove the messgaes from queue? as am  using pagging.

                      When I restart the jboss server every time the  some count( say x ) was consumed by the MDB .

                      so I've checked under the ( "/jboss-as-7.1.2.Final-SNAPSHOT/standalone/data/messagingpaging/2024a9b7-9a8f-11e1-8ae3-011ae3fcc0c2" ) directory contains the 114 .page files.

                      Is this reason ?

                 

                       Should I need to remove .page file mannually?

                 

                      But why the jboss was not removing this pages once it was fetched by MDB ?

                  

                      Please Clebert If you know this issues help me.  and let me know how to do this and solution to the my problems (Questions).