You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by vinodhvp <vi...@gmail.com> on 2014/06/30 16:55:53 UTC

Asynchronous delay in camel route

Hi,

I am working on a switchyard project.
We have a requirement to add message to a delayed Queue.
I used the following code snippet in camel route to post the message to the
Queue.

from("switchyard://MyOwnCamelRoute")
       .delay(10000).asyncDelayed()
       .log("Received message for 'MyOwnCamelRoute' : ${body}")
       .to("jms:MyQueue?connectionFactory=java:/ConnectionFactory")

The message is getting placed in the Queue only after the delay.
But the issue is that the call is not asynchronous.
The control comes back only after the delay.
Am I missing something here?
Please help.

Thanks
Anand



--
View this message in context: http://camel.465427.n5.nabble.com/Asynchronous-delay-in-camel-route-tp5753057.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Asynchronous delay in camel route

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah its likely the consumer on the SY end, or whatever the original
Camel consumer is does not support async routing.
http://camel.apache.org/asynchronous-processing.html
http://camel.apache.org/asynchronous-routing-engine.html

On Mon, Jun 30, 2014 at 4:55 PM, vinodhvp <vi...@gmail.com> wrote:
>
> Hi,
>
> I am working on a switchyard project.
> We have a requirement to add message to a delayed Queue.
> I used the following code snippet in camel route to post the message to the
> Queue.
>
> from("switchyard://MyOwnCamelRoute")
>        .delay(10000).asyncDelayed()
>        .log("Received message for 'MyOwnCamelRoute' : ${body}")
>        .to("jms:MyQueue?connectionFactory=java:/ConnectionFactory")
>
> The message is getting placed in the Queue only after the delay.
> But the issue is that the call is not asynchronous.
> The control comes back only after the delay.
> Am I missing something here?
> Please help.
>
> Thanks
> Anand
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Asynchronous-delay-in-camel-route-tp5753057.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/