On 08/31/2011 02:06 AM, Damian Harvey wrote:
> The docs say that you can set whether to autostart a route based on a
> boolean, string or property
>
> from("activemq:queue:special").autoStartup(startupRoute).to("file://backup");
>
> However it looks like autoStartup() has been removed (or never was in) the
> fluent API for RouteDefinition. What is the recommended way to decide whether
> to autoStart a route based on a property?
>
> My requirement is that we are wanting to replace an existing integration
> platform one route at a time so would like to startup Camel with several
> routes shutdown but be able to change a properties file and have them
> autoStart.
If you are running an older version, you'll have to use .noAutoStartup()
combined with an if check I think:
RouteDefinition rf = from("seda:something").routeId("myId");
if (doNotStart) rf.noAutoStartup();
rf.to("somefile");
...
T
> Thanks,
>
> Damian.
>
>
> ________________________________
>
> This communication (and any attachments) is directed in confidence to the
> addressee(s) listed above, and may not otherwise be distributed, copied or
> used. The contents of this communication may also be subject to privilege,
> and all rights to that privilege are expressly claimed and not waived. If you
> have received this communication in error, please notify us by reply e-mail
> or by telephone and delete this communication (and any attachments) without
> making a copy.
>
> Before opening or using attachments, you should check them for viruses and
> defects. We do not accept liability in connection with computer virus, data
> corruption, delay, interruption, unauthorised access or unauthorised
> amendment.
>
--
Regards / Med vennlig hilsen
Tarjei Huse
Mobil: 920 63 413