2 Replies Latest reply on Jan 25, 2010 2:54 AM by sergus

    Rescheduling message delivery

      Hello all.

      Need some help in managing delivery of messages to queue.

       

      We have an application that sends messages to queue. For each message sent there is "JMS_JBOSS_SCHEDULED_DELIVERY" property set to indicate when the message should be delivered for processing. Here is code snippet:

       

      ...
      message.setLongProperty("JMS_JBOSS_SCHEDULED_DELIVERY", System.currentTimeMillis() + 3 * 60 * 60 *  1000);
      producer.send(message);
      ...

       

      Most of the time the delivery of the message is scheduled for 3 hours after it is sent.

      However, after the message has been sent, sometimes there is a need

      1) To change delivery of the message to earlier or later time

      2) To cancel message delivery i.e undo send operation

       

      I've not found how this can be done neither from JMX console nor programatically.

       

      Is there any way to accomplish these requirements?

       

      Thank you on advance.