7 Replies Latest reply on Feb 20, 2013 8:40 AM by janvandeklok

    How to reset the messageCounter for a given queue?

    janvandeklok

      For some (still unknown) reason we have some queue's that contain no messages (not in memory and not in pages) but the MDB for that queue still reports a number >0 on the messageCounter attribute. These are all FIFO queue's. As soon as we put a message on the queue, that particular message is consumed by our one(and only one ) consumer. This means in mho that the queue really contains no messages.

       

      So, the messageCounter value is off.  We are still trying to figure out how this was caused but in the mean time we would like to reset this counter because all kind of monitoring alarms go off if there are messages stuck on our queue's for too long of a period.

       

      I tried to invoke the resetMessageCounter method on the mdb in the jmxConsole but this does not seems to do anything (afaics).

       

      What action can I take to reset the counter of a single queue (amongst 700 other queue's which should not be changed at all) ???

       

       

      Any suggestion is Welcome,

       

       

      Regards  Jan van de Klok

        • 1. Re: How to reset the messageCounter for a given queue?
          clebert.suconic

          You should not have a situation where there is no message and still having a counter. I would say the best would be to consume the messages ( or delete them).

           

           

          That reset message count is probably about the history of counts...

           

           

          What version are you using? We have fixed a few issues about paging and message counts.

          • 2. Re: How to reset the messageCounter for a given queue?
            janvandeklok

            Clebert,

             

                 I Know we should not have been in that situation, but unfortunatly we are.

             

            I already started another discussion on that topic to find out why that happend but up to now no cause was found!!

             

            There are NO message to consume or delete !!!!! Thats the whole problem!!!!!.

             

            The mesagecdounter says 324 messages but there is nothing to consume!!!

             

            we used 2.2.5 up to now  but are now upgrading to version 2.2.14  just for the lost message problem.

             

            see also these discusssion:  https://community.jboss.org/message/792001#792001

            • 3. Re: How to reset the messageCounter for a given queue?
              clebert.suconic

              There was a bug on a previous version (2.2.14 included). There's the page counter that was affected by a bug on paging and it could eventually get negative.

               

              if you have no messages whatsoever, you could just restart the journals (deleting the message journal and paging).

               

               

              the newer version will delete the counter as soon as you consume all the messages. for non paged messages this is a plain counter of the linkedList at the memory.

              • 4. Re: How to reset the messageCounter for a given queue?
                clebert.suconic

                BTW: if the counters are already bad, they will be bad until you restart the data.

                 

                You should consume all your data and restart the journals probably.

                 

                 

                The newest version will delete the page counters as soon as you leave paging.. so this won't (should't) happen after the newest version.

                • 5. Re: How to reset the messageCounter for a given queue?
                  janvandeklok

                  Ik know that but my problem is that we have about 700 queue's. Most queue's are OK but on some queue'sa there are messages lost (nothing to consume) but the counters are still showing the corroct nmbr of message that we put on the queue  minus the ones we have consumed.

                   

                  WE REALLY LOST MESSAGES ON SOME QUEUES!!! We've already verified that the write cache on the storage disk is disabled and we don't see any erro messages indicating a proble with our queue's.

                   

                  Since there are a number of queue's that still contain messages and some not (with a message counter that is off)  we need a way to reset that counter for a specific queue.

                  If I delete teh pages and journals (a restart as you call it), I will loos all the other mesages. Tha's not an option!!!

                   

                  How can I reset the counter for just 1 queue??

                  • 6. Re: How to reset the messageCounter for a given queue?
                    clebert.suconic

                    if you don't want to update your version, You could use stop the server, export, remove the message-counter record for the queue, import.. and restart the server.

                     

                     

                    The newer version has a fix for that.

                    • 7. Re: How to reset the messageCounter for a given queue?
                      janvandeklok

                      Hello Clebert,

                       

                      sorry for this l;ate reponmse , but i've just returned from 2 3 week holiday.

                       

                      I've exported the journal (which is rather large) and I see a lot of the following data:

                       

                      ....

                      ....

                      operation@Update,id@10739941248,userRecordType@34,length@12,isUpdate@true,compactCount@78,data@AAAAAAAADxEAAA-B

                      operation@UpdateTX,txID@10739953919,id@10739941248,userRecordType@33,length@8,isUpdate@true,compactCount@78,data@AAAAAAAADxE=

                      operation@Rollback,txID@10739953919

                      operation@Update,id@10739941248,userRecordType@34,length@12,isUpdate@true,compactCount@78,data@AAAAAAAADxEAAA-C

                      operation@UpdateTX,txID@10739953920,id@10739941248,userRecordType@33,length@8,isUpdate@true,compactCount@78,data@AAAAAAAADxE=

                      operation@Rollback,txID@10739953920

                      operation@Update,id@10739941248,userRecordType@34,length@12,isUpdate@true,compactCount@78,data@AAAAAAAADxEAAA-D

                      operation@UpdateTX,txID@10739953921,id@10739941248,userRecordType@33,length@8,isUpdate@true,compactCount@78,data@AAAAAAAADxE=

                      operation@Rollback,txID@10739953921

                      operation@Update,id@10739941248,userRecordType@34,length@12,isUpdate@true,compactCount@78,data@AAAAAAAADxEAAA-E

                      operation@UpdateTX,txID@10739953922,id@10739941248,userRecordType@33,length@8,isUpdate@true,compactCount@78,data@AAAAAAAADxE=

                      operation@Rollback,txID@10739953922

                      operation@Update,id@10739941248,userRecordType@34,length@12,isUpdate@true,compactCount@78,data@AAAAAAAADxEAAA-F

                      ...

                      ...

                       

                      What are the characteristics of a message-counter record (the one I should delete) (recordtype??, operation code etc). So I can use the search util to find these records.

                       

                      Jan