1 Reply Latest reply on Jul 18, 2007 1:45 PM by adrian.brock

    Removing a message from the queue

    adoorsarath

      Sir,

      I have a JMS client written using Apache Common Messanger APIs.

      I have configured the messenger to create a session which is

      not transacted
      and the Acknowledgement mode as

      AUTO_ACKNOWLEDGE

      This jms client program is running as a Timer Task [executing

      every 1 minute].But it is always getting the same message from the

      queue.ie..,Getting already received messages.

      So My question is " Is there any way to delete a message from

      the queue up on receive of it at the very first time?"

      would indeed appreciate help on this.


        • 1. Re: Removing a message from the queue

          You're on the wrong track. JMS is not a database where you do CRUD operations.

          Redelivery of messages is a part of the JMS api.

          If the client does not acknowledge a message (for whatever reason)
          then it will be redelivered with the redelivered flag set:

          if (message.getJMSRedelivered()) {
           // take extra care
          }