Timed delivery of messages in JMS

Discussions

EJB programming & troubleshooting: Timed delivery of messages in JMS

  1. Timed delivery of messages in JMS (6 messages)

    Hi,

    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,

    thanks,
    David

    Threaded Messages (6)

  2. David,

    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

    Goodluck

    Mike
  3. Timed delivery of messages in JMS[ Go to top ]

    You should not enqueue the messages at all if you dont want the MDB to receive them. Enqueue only when the time interval passes....
  4. Timed delivery of messages in JMS[ Go to top ]

    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.

  5. Timed delivery of messages in JMS[ Go to top ]

    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.
  6. Timed delivery of messages in JMS[ Go to top ]

    Hi,

    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?

    David
  7. waiting before enqueing[ Go to top ]

    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.