Problem: a producer sends a message to the queue. after this 15 minutes should be waited before the consumer processes this messages because it is known that some preconditional background processes are guaranteed to be done by then.
a) blocking a thread with sleep (illegal?) in the consumer seems stupid. b) doing this with a selector on the timestamp seems to me to be an expensive task if possible at all. c) ? what is the correct and most efficient/performant enterprise pattern to do that?
posted 12 years ago
A helpful friend found something:
Weblogic has a proprietary API to do this (weblogic.jms.extensions.WLMessageProducer) sender).setTimeToDeliver(15000);