You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by osian <os...@osian.me.uk> on 2006/04/28 18:09:52 UTC

Delay Message Processing

Is there any way in which to tell ActiveMQ when producing a message that this
message is not to be processed until a set date/time. I have considered
validating the message, and if it is not ready to process, produce a new
message (and this will go on until it is ready to be processed), but this is
a large overhead for a simple problem.  Any advice would be greatfully
appreciated,

Cheers,
Osh
--
View this message in context: http://www.nabble.com/Delay-Message-Processing-t1525423.html#a4143283
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Delay Message Processing

Posted by James Strachan <ja...@gmail.com>.
I'd use a scheduler (like Quartz) to send the message

http://www.opensymphony.com/quartz/

we currently don't have any efficient ways to send a message for
dispatching in the future.

It wouldn't be too hard to add a special Broker Interceptor to deal
with 'future messages' where some JMS message header could be used to
define the time at which a message should be dispatched. Then
internally the interceptor would filter out these messages and create
a new timer event in Quartz.

http://activemq.org/Interceptors

A simple implementation could just be to persist the message inside
quartz as the timer event state; a more clever and efficient
implementation would be to use ActiveMQ for the persistence and then
use the timer event to start the dispatching of the message. Though
this might involve some change to the ActiveMQ broker code to be able
to persist messages that should not be dispatched.


On 4/28/06, osian <os...@osian.me.uk> wrote:
>
> Is there any way in which to tell ActiveMQ when producing a message that this
> message is not to be processed until a set date/time. I have considered
> validating the message, and if it is not ready to process, produce a new
> message (and this will go on until it is ready to be processed), but this is
> a large overhead for a simple problem.  Any advice would be greatfully
> appreciated,
>
> Cheers,
> Osh
> --
> View this message in context: http://www.nabble.com/Delay-Message-Processing-t1525423.html#a4143283
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--

James
-------
http://radio.weblogs.com/0112098/