You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Alexey <re...@gmail.com> on 2012/01/23 17:09:38 UTC
Forward message
Hi, is it possible for Camel and ActiveMQ forward a message from one queue to
another?
whether there are any ways to do this?
thank you
--
View this message in context: http://camel.465427.n5.nabble.com/Forward-message-tp5166528p5166528.html
Sent from the Camel Development mailing list archive at Nabble.com.
Re: Forward message
Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Alexey,
a from dsl element can only be at the start of a route. So this is not
possible.
Christian
Am 25.01.2012 14:27, schrieb Alexey:
> <route>
> <from uri="activemq:PayrollOrder.Files.ToInspector.New" />
> <to uri="activemq:queue:PayrollOrder.Files.ToInspector.InProcess" />
> <choice>
> <when>
> <method method="inspectorAction" ref="processingPayrollOrder" />
>>>>>>>>> <from
> uri="activemq:PayrollOrder.Files.ToInspector.InProcess">
> <to uri="activemq:queue:PayrollOrder.Files.ToOperator.New">
> ...
>
> Christian, note the line that I have marked>>>
> So can I do?
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Forward-message-tp5166528p5430192.html
> Sent from the Camel Development mailing list archive at Nabble.com.
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com
Re: Forward message
Posted by Alexey <re...@gmail.com>.
<route>
<from uri="activemq:PayrollOrder.Files.ToInspector.New" />
<to uri="activemq:queue:PayrollOrder.Files.ToInspector.InProcess" />
<choice>
<when>
<method method="inspectorAction" ref="processingPayrollOrder" />
>>>>>>>> <from
uri="activemq:PayrollOrder.Files.ToInspector.InProcess">
<to uri="activemq:queue:PayrollOrder.Files.ToOperator.New">
...
Christian, note the line that I have marked >>>
So can I do?
--
View this message in context: http://camel.465427.n5.nabble.com/Forward-message-tp5166528p5430192.html
Sent from the Camel Development mailing list archive at Nabble.com.
Re: Forward message
Posted by Christian Schneider <ch...@die-schneider.net>.
Basically that should work. What is the error you get?
Christian
Am 24.01.2012 13:50, schrieb Alexey:
> Unfortunately, I need to do this automatically.
>
> I need to configure it using the Spring xml
> I tried to write like this:
>
> ...
> <route>
> <from uri="activemq:PayrollOrder.Files.ToInspector.New" />
> <to uri="activemq:queue:PayrollOrder.Files.ToInspector.InProcess" />
> <choice>
> <when>
> <method method="inspectorAction" ref="processingPayrollOrder" />
> <from
> uri="activemq:PayrollOrder.Files.ToInspector.InProcess"
> <to
> uri="activemq:queue:PayrollOrder.Files.ToOperator.New" />
> ...
>
> but the result was a mistake :(
>
> Thank you for your response, Christian
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Forward-message-tp5166528p5281573.html
> Sent from the Camel Development mailing list archive at Nabble.com.
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com
Re: Forward message
Posted by Alexey <re...@gmail.com>.
Unfortunately, I need to do this automatically.
I need to configure it using the Spring xml
I tried to write like this:
...
<route>
<from uri="activemq:PayrollOrder.Files.ToInspector.New" />
<to uri="activemq:queue:PayrollOrder.Files.ToInspector.InProcess" />
<choice>
<when>
<method method="inspectorAction" ref="processingPayrollOrder" />
<from
uri="activemq:PayrollOrder.Files.ToInspector.InProcess"
<to
uri="activemq:queue:PayrollOrder.Files.ToOperator.New" />
...
but the result was a mistake :(
Thank you for your response, Christian
--
View this message in context: http://camel.465427.n5.nabble.com/Forward-message-tp5166528p5281573.html
Sent from the Camel Development mailing list archive at Nabble.com.
Re: Forward message
Posted by Christian Schneider <ch...@die-schneider.net>.
Am 23.01.2012 17:09, schrieb Alexey:
> Hi, is it possible for Camel and ActiveMQ forward a message from one queue to
> another?
>
> whether there are any ways to do this?
>
> thank you
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Forward-message-tp5166528p5166528.html
> Sent from the Camel Development mailing list archive at Nabble.com.
Hi Alexey,
there are several ways to do this.
For example you can setup a route in camel:
from("jms://queue1").to("jms:queue2);
If you just want to move some messages by hand you can use the ActiveMQ
MBeans. Just point your jconsole at the activemq process.
The queue mbeans for example have a moveMessageTo(destination,
messageId) or a moveMatchingMessagesTo(destination, jmsSelector).
I am also currently working on jms commands for Apache Karaf that will
allow to do similar things from the karaf shell.
Christian
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com