2 Replies Latest reply on May 28, 2010 1:08 PM by peterj

    Clearing messages from all queues.

    whitingjr

      Hi,
        Am interested to know if there is a convenient ant task or script that does the following.

       

      The script iterates through all message queues and flushes all messages out.

       

      To avoid the possibility of being being misunderstood. I do not mean "flush to disk". Instead I mean "flush down the loo". The messages are benchmark messages and need to be cleared before the next run.

       

      Jeremy

        • 1. Re: Clearing messages from all queues.
          whitingjr

          Ok solved this. Rather than flush the queues the answer is to remove the undelying data files in these directories.

           

          ${data.dir:../data}/large-messages

          ${data.dir:../server}/data/journal

           

          Then restart the server.

           

          Jeremy

          • 2. Re: Clearing messages from all queues.
            peterj

            This solution works only if you are using the default hsqldb as your messaging data store (which you should not be using in production). For a general solution, use twiddle to invoke the removeAllMessages operation on the designated queue:

             

            twiddle invoke XXX removeAllMessages

             

            where XXX is the name of the MBean for your queue (I think this works for topics also, but i don't have a topic handy to verify it with).