You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Garry <gm...@hotmail.com> on 2007/11/09 03:19:08 UTC

Unfamiliar syntax

Hi,

A basic question: while working through various examples, I've come across
constructs like this:

 from("timer:myTimerEvent?fixedRate=true")
           .setBody(constant("Helloworld!"))
           .to("log:org.apache.servicemix.samples.camel.ExampleCamelRoute");

What is the syntax "timer:myTimerEvent?fixedRate=true" and where is it
defined?

Thanks, Garry
-- 
View this message in context: http://www.nabble.com/Unfamiliar-syntax-tf4775177s12049.html#a13660094
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Unfamiliar syntax

Posted by Gert Vanthienen <ge...@skynet.be>.
Garry,

You are looking at an Apache Camel route, specified in the fluent API.  
This particular example uses Camel's Timer component 
(http://activemq.apache.org/camel/timer.html) for sending messages to 
the Log component (http://activemq.apache.org/camel/log.html).  This 
kind of route can be deployed using the servicemix-camel JBI component.

You can however also use ServiceMix and Camel together.  For instance, 
you can use to implement EIP (look at 
http://servicemix.apache.org/replacing-tutorial-eip-su-with-tutorial-camel-su.html 
for an example).

Regards,

Gert

Garry wrote:
> Hi,
>
> A basic question: while working through various examples, I've come across
> constructs like this:
>
>  from("timer:myTimerEvent?fixedRate=true")
>            .setBody(constant("Helloworld!"))
>            .to("log:org.apache.servicemix.samples.camel.ExampleCamelRoute");
>
> What is the syntax "timer:myTimerEvent?fixedRate=true" and where is it
> defined?
>
> Thanks, Garry
>