You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Lance Walton <la...@mac.com> on 2012/07/30 18:29:09 UTC
Scala DSL - How do I give a route an id?
Hi.
I'm using the Scala DSL to add routes to the CamelContext. However, I also want to be able to remove some of these routes from the CamelContext later. I can see how to do this if I have a route id, but I can't see how to assign an id to a route in the DSL. Can anyone point me at the right thing?
Thanks,
Lance
_________________
http://www.stateofflow.com
http://www.casualmiracles.com
http://www.twitter.com/lancewalton
+44 (0)7779 026533
Re: Scala DSL - How do I give a route an id?
Posted by Henryk Konsek <he...@gmail.com>.
> Perfect. Thanks for the excellent and speedy response.
This kind of knowledge shouldn't be spread only by the word of mouth.
:) I've updated the wiki [1].
[1] https://cwiki.apache.org/confluence/display/CAMEL/Scala+DSL+-+Getting+Started
--
Henryk Konsek
http://henryk-konsek.blogspot.com
Re: Scala DSL - How do I give a route an id?
Posted by Lance Walton <la...@mac.com>.
Perfect. Thanks for the excellent and speedy response.
Regards,
Lance
On 30 Jul 2012, at 18:02, Jon Anstey <ja...@gmail.com> wrote:
> Here's an example
>
> http://svn.apache.org/repos/asf/camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/RouteIdTest.scala
>
> On Mon, Jul 30, 2012 at 2:25 PM, Lance Walton <la...@mac.com> wrote:
>
>> Hi.
>>
>> Thanks for the reply.
>>
>> That looks Java DSL like. That's what I want to do but with the Scala DSL.
>>
>> Regards,
>>
>> Lance
>>
>>
>>
>> On 30 Jul 2012, at 17:46, Jon Anstey <ja...@gmail.com> wrote:
>>
>>> Did you try using routeId?
>>>
>>> from("direct:start")
>>> .routeId("foo")
>>> ...
>>>
>>> On Mon, Jul 30, 2012 at 1:59 PM, Lance Walton <la...@mac.com>
>> wrote:
>>>
>>>> Hi.
>>>>
>>>> I'm using the Scala DSL to add routes to the CamelContext. However, I
>> also
>>>> want to be able to remove some of these routes from the CamelContext
>> later.
>>>> I can see how to do this if I have a route id, but I can't see how to
>>>> assign an id to a route in the DSL. Can anyone point me at the right
>> thing?
>>>>
>>>> Thanks,
>>>>
>>>> Lance
>>>> _________________
>>>>
>>>> http://www.stateofflow.com
>>>> http://www.casualmiracles.com
>>>> http://www.twitter.com/lancewalton
>>>> +44 (0)7779 026533
>>>>
>>>>
>>>
>>>
>>> --
>>> Cheers,
>>> Jon
>>> ---------------
>>> FuseSource
>>> Email: jon@fusesource.com
>>> Web: fusesource.com
>>> Twitter: jon_anstey
>>> Blog: http://janstey.blogspot.com
>>> Author of Camel in Action: http://manning.com/ibsen
>>
>
>
>
> --
> Cheers,
> Jon
> ---------------
> FuseSource
> Email: jon@fusesource.com
> Web: fusesource.com
> Twitter: jon_anstey
> Blog: http://janstey.blogspot.com
> Author of Camel in Action: http://manning.com/ibsen
Re: Scala DSL - How do I give a route an id?
Posted by Jon Anstey <ja...@gmail.com>.
Here's an example
http://svn.apache.org/repos/asf/camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/RouteIdTest.scala
On Mon, Jul 30, 2012 at 2:25 PM, Lance Walton <la...@mac.com> wrote:
> Hi.
>
> Thanks for the reply.
>
> That looks Java DSL like. That's what I want to do but with the Scala DSL.
>
> Regards,
>
> Lance
>
>
>
> On 30 Jul 2012, at 17:46, Jon Anstey <ja...@gmail.com> wrote:
>
> > Did you try using routeId?
> >
> > from("direct:start")
> > .routeId("foo")
> > ...
> >
> > On Mon, Jul 30, 2012 at 1:59 PM, Lance Walton <la...@mac.com>
> wrote:
> >
> >> Hi.
> >>
> >> I'm using the Scala DSL to add routes to the CamelContext. However, I
> also
> >> want to be able to remove some of these routes from the CamelContext
> later.
> >> I can see how to do this if I have a route id, but I can't see how to
> >> assign an id to a route in the DSL. Can anyone point me at the right
> thing?
> >>
> >> Thanks,
> >>
> >> Lance
> >> _________________
> >>
> >> http://www.stateofflow.com
> >> http://www.casualmiracles.com
> >> http://www.twitter.com/lancewalton
> >> +44 (0)7779 026533
> >>
> >>
> >
> >
> > --
> > Cheers,
> > Jon
> > ---------------
> > FuseSource
> > Email: jon@fusesource.com
> > Web: fusesource.com
> > Twitter: jon_anstey
> > Blog: http://janstey.blogspot.com
> > Author of Camel in Action: http://manning.com/ibsen
>
--
Cheers,
Jon
---------------
FuseSource
Email: jon@fusesource.com
Web: fusesource.com
Twitter: jon_anstey
Blog: http://janstey.blogspot.com
Author of Camel in Action: http://manning.com/ibsen
Re: Scala DSL - How do I give a route an id?
Posted by Lance Walton <la...@mac.com>.
Hi.
Thanks for the reply.
That looks Java DSL like. That's what I want to do but with the Scala DSL.
Regards,
Lance
On 30 Jul 2012, at 17:46, Jon Anstey <ja...@gmail.com> wrote:
> Did you try using routeId?
>
> from("direct:start")
> .routeId("foo")
> ...
>
> On Mon, Jul 30, 2012 at 1:59 PM, Lance Walton <la...@mac.com> wrote:
>
>> Hi.
>>
>> I'm using the Scala DSL to add routes to the CamelContext. However, I also
>> want to be able to remove some of these routes from the CamelContext later.
>> I can see how to do this if I have a route id, but I can't see how to
>> assign an id to a route in the DSL. Can anyone point me at the right thing?
>>
>> Thanks,
>>
>> Lance
>> _________________
>>
>> http://www.stateofflow.com
>> http://www.casualmiracles.com
>> http://www.twitter.com/lancewalton
>> +44 (0)7779 026533
>>
>>
>
>
> --
> Cheers,
> Jon
> ---------------
> FuseSource
> Email: jon@fusesource.com
> Web: fusesource.com
> Twitter: jon_anstey
> Blog: http://janstey.blogspot.com
> Author of Camel in Action: http://manning.com/ibsen
Re: Scala DSL - How do I give a route an id?
Posted by Jon Anstey <ja...@gmail.com>.
Did you try using routeId?
from("direct:start")
.routeId("foo")
...
On Mon, Jul 30, 2012 at 1:59 PM, Lance Walton <la...@mac.com> wrote:
> Hi.
>
> I'm using the Scala DSL to add routes to the CamelContext. However, I also
> want to be able to remove some of these routes from the CamelContext later.
> I can see how to do this if I have a route id, but I can't see how to
> assign an id to a route in the DSL. Can anyone point me at the right thing?
>
> Thanks,
>
> Lance
> _________________
>
> http://www.stateofflow.com
> http://www.casualmiracles.com
> http://www.twitter.com/lancewalton
> +44 (0)7779 026533
>
>
--
Cheers,
Jon
---------------
FuseSource
Email: jon@fusesource.com
Web: fusesource.com
Twitter: jon_anstey
Blog: http://janstey.blogspot.com
Author of Camel in Action: http://manning.com/ibsen