We are trying to work out a way to stop JMS messages being delivered to an MDB for a set period of time. During this time the messages should just be queued.
Looking at the Weblogic 6.1 docs, I see there is an extension to the MessageProducer so you can set the delivery time. I however want to see if there was a more standard way of doing it before I start using a vendor extension,
I don't think you can use MDB in that way. You may have to use a timer service to periodically read a queue and either process the message or pass it on to another queue that an MDB is listening on.
my 2 cents
You should not enqueue the messages at all if you dont want the MDB to receive them. Enqueue only when the time interval passes....
why should you not attempt to queue them?
If you are going to make a posting stating soemthing like this please include your reason why you feel that way. As is stands you posting is not very helpful.
my take was this -
implement a class which sleeps for the desired time interval and then enqueue the message - now u dont have to worry about dequeueing the message before its time.
I don't want the client threads to block while the system is down. Therefore to do this I need to store the messages somewhere in the application.
My thoughts are if I need to store the messages anyway why not attempt to queue them on the JMS queue?
A good reason *not* to wait before enqueing is due to HA. If the process/machine that is waiting to enqueue the message dies; you lose that msg.
If you have an HA JMS broker setup, then the msg will be robustly stored.