Hi Gert,

First check: have you enabled schedulerSupport="true" in your broker config?

For a worked example of using AMQ_SCHEDULED_DELAY see here:

  https://github.com/tarka/Camel-Async-Test/tree/amq-delay-header

It uses XML configuration rather than Java but should be easily portable.

Cheers,
Steve

On 5 April 2011 07:15, Gert Villemos <gville...@yahoo.de> wrote:
> As part of my routes, I need a processor to calculate and set a delay in the
> distribution. The message should be released to the Activemq topic/queue,
> but only send to subscribers when the delay has expired.
>
> AMQ_SCHEDULED_DELAY seems ideal for this. But I cant get it to work.
>
> In my processor bean I have
>
>  exchange.getIn().setHeader("AMQ_SCHEDULED_DELAY", delay);
>
> The exchange I thereafter route to an activemq endpoint.
>
> The problem is that the subscriber receives all messages immediately, no
> matter the delay set. It looks as if the AMQ_SCHEDULED_DELAY header flag is
> not taken into account.
>
> What am I doing wrong?
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Howto-use-delay-message-brokerage-in-a-Camel-Route-using-AMQ-SCHEDULED-DELAY-tp4282763p4282763.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to