0 Replies Latest reply on Jul 24, 2003 6:26 AM by Gary Ratcliffe

    3.2.2 Branch Message Expiry Broken

    Gary Ratcliffe Newbie

      This is a problem with the most recent revision (1.20.2.13) of the BasicQueue class.

      If a message is received with a non-zero time to live, which is converted to an expiry time the chances are that it will be expired straight away regardless of the TTL specified.

      The cause is a change to the internalAddMessage method. It creates a message expiry timer 'task' to expiry the message at the correct time. Over the the timer is being given an expiry time corresponding to the scheduled time (a new feature I think) for redelivery. The timer should be being passed the message expiry time.

      Modified source file based on 1.20.2.13 attached. One change at line 679.

      Attach file is not working for me so here's the line:

      // If a message is set to expire, and nobody wants it, put its reaper in
      // the timer queue
      if (message.messageExpiration > 0)
      {
      // This could be a waste of memory for large numbers of expirations
      ExpireMessageTask t = new ExpireMessageTask(message);
      messageTimer.schedule(t, message.messageExpiration); <==== Change
      }