sorry for the 3x post..
There is a scheduled delivery feature for this.
llong time = System.currentTimeMills() + sometime;
Is this extension in JBoss 3.2.1 ?
looks like it's only in 3.2.2 . what would it take to back port to 3.2.1 ? Looks like only the 2 files were changed
module: src/main/org/jboss/mq ; files: SpyMessage.java SpyQueueBrowser.java
Added the following vendor-specific JMS properties
public static final String PROPERTY_SCHEDULED_DELIVERY = "JMS_JBOSS_SCHEDULED_DELIVERY";
public static final String PROPERTY_REDELIVERY_DELAY = "JMS_JBOSS_REDELIVERY_DELAY";
public static final String PROPERTY_REDELIVERY_COUNT = "JMS_JBOSS_REDELIVERY_COUNT";
public static final String PROPERTY_REDELIVERY_LIMIT = "JMS_JBOSS_REDELIVERY_LIMIT"; 1. Scheduled delivery, paused (delayed) re-delivery 2. Track number of delivery attempts of a message 3. Set maximum delivery attempts per message 4. Proactively expire messages, without having to restore the whole message from disk if cached. Also, the same timer thread which handles scheduled messages proactively "reaps" expired messages.
Wrote a custom Timer class which is modeled after java.util.Timer, but won't create a thread until tasks are scheduled. It also has a "clear" method for clearing all scheduled messages.