I am doing something like this, and plan to use a separate source file (like below) that instantiates the route builders (that are in other sources) for each set of routes that only vary by the properties.
When SCR sets this up at run time it injects the properties values into the routes. > -----Original Message----- > From: souciance [mailto:[email protected]] > Sent: Friday, June 10, 2016 9:46 AM > To: [email protected] > Subject: RE: Generic camel routes - multiple instances > > Does that mean for SCR you define multiple properties like below, one for > each instance you want and the actual instancesiation is done auto- > magically? What I mean is, if I want three routes with different parameters, > do I define the three different Properties and that is it, or is there more > to it? > > Component(label = CamelScrExample.COMPONENT_LABEL, description = > CamelScrExample.COMPONENT_DESCRIPTION, immediate = true, metatype > = true) @Properties({ > @Property(name = "camelContextId", value = "camel-scr-example"), > @Property(name = "camelRouteId", value = "foo/timer-log"), > @Property(name = "active", value = "true"), > @Property(name = "from", value = "timer:foo?period=5000"), > @Property(name = "to", value = "log:foo?showHeaders=true"), > @Property(name = "messageOk", value = "Success: {{from}} -> {{to}}"), > @Property(name = "messageError", value = "Failure: {{from}} -> {{to}}"), > @Property(name = "maximumRedeliveries", value = "0"), > @Property(name = "redeliveryDelay", value = "5000"), > @Property(name = "backOffMultiplier", value = "2"), > @Property(name = "maximumRedeliveryDelay", value = "60000") > }) > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/Generic- > camel-routes-multiple-instances-tp5783866p5783873.html > Sent from the Camel - Users mailing list archive at Nabble.com.
