You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Gert de Wit <ge...@gmail.com> on 2012/09/19 16:32:03 UTC

ActiveMQ, Camel and Spring

Hi all,

Would like to access the ActiveMQ message-headers and body from within
Camel, to do something like

        <route>
            <description>exec test</description>
            <from uri="activemq:TEST.EXEC"/>
            <to uri="exec:///tmp/mytest?args=AMQHEADERS.message-id
AMQBODY&amp;outFile=/tmp/mytest.out&amp;workingDir=/tmp&amp;useStderrOnEmptyStdout=true&amp;timeout=5"/>
        </route>

For a number of reasons, would like to use Spring. Possible, or not ? And
if so, how ?

Can't find any examples, unfortunately.

Thanks
Gert

Re: ActiveMQ, Camel and Spring

Posted by James Strachan <ja...@fusesource.com>.
On 19 September 2012 15:57, Hadrian Zbarcea <hz...@gmail.com> wrote:
> Actually activemq-camel and camel-exec don't work well together because of a
> TypeConverter in activemq-camel.

Got any details of the problem the type converters in activemq-camel
cause camel-exec?

-- 
James
-------
FuseSource
Email: james@fusesource.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

FuseSource: integration everywhere

Re: ActiveMQ, Camel and Spring

Posted by Hadrian Zbarcea <hz...@gmail.com>.
Actually activemq-camel and camel-exec don't work well together because 
of a TypeConverter in activemq-camel. It does work with with camel-jms 
though, I'd recommend using that.

Cheers,
Hadrian

On 09/19/2012 10:32 AM, Gert de Wit wrote:
> Hi all,
>
> Would like to access the ActiveMQ message-headers and body from within
> Camel, to do something like
>
>          <route>
>              <description>exec test</description>
>              <from uri="activemq:TEST.EXEC"/>
>              <to uri="exec:///tmp/mytest?args=AMQHEADERS.message-id
> AMQBODY&amp;outFile=/tmp/mytest.out&amp;workingDir=/tmp&amp;useStderrOnEmptyStdout=true&amp;timeout=5"/>
>          </route>
>
> For a number of reasons, would like to use Spring. Possible, or not ? And
> if so, how ?
>
> Can't find any examples, unfortunately.
>
> Thanks
> Gert
>

Re: ActiveMQ, Camel and Spring

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

Ah you want to use some of the message headers from the JMS message
consumed from ActiveMQ, in the exec endpoint when you call that native
application?

If so check this FAQ about "dynamic to" endpoints in Camel
http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html

You should use the recipient list EIP that supports this as shown in that FAQ


On Wed, Sep 19, 2012 at 4:32 PM, Gert de Wit <ge...@gmail.com> wrote:
> Hi all,
>
> Would like to access the ActiveMQ message-headers and body from within
> Camel, to do something like
>
>         <route>
>             <description>exec test</description>
>             <from uri="activemq:TEST.EXEC"/>
>             <to uri="exec:///tmp/mytest?args=AMQHEADERS.message-id
> AMQBODY&amp;outFile=/tmp/mytest.out&amp;workingDir=/tmp&amp;useStderrOnEmptyStdout=true&amp;timeout=5"/>
>         </route>
>
> For a number of reasons, would like to use Spring. Possible, or not ? And
> if so, how ?
>
> Can't find any examples, unfortunately.
>
> Thanks
> Gert



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen