You could inject property values from outside the routes.
> -----Original Message----- > From: Erol [mailto:e...@erol.si] > Sent: Thursday, February 23, 2017 6:01 AM > To: users@camel.apache.org > Subject: Passing parameters from routes to components > > Hello all > > I'm dynamically building routes. Route consists of multiple components. Data > for each component is saved in the database. > > Currently I have routes like this > > <setHeader headerName="databaseId"> > <constant>cecf4dec-530d-4d4c-aa31-6f88f6c558d1</constant> > </setHeader> > <to uri="bean:ParseOrdersComponent" /> > <setHeader headerName="databaseId"> > <constant>d507ba3e-aa5a-4047-b662-c8ab3abd1f2b</constant> > </setHeader> > <to uri="bean:ValidateOrdersComponent" /> <setHeader > headerName="databaseId"> > <constant>6c8511cc-22fd-46e1-8333-70e4b8e2cda1</constant> > </setHeader> > <to uri="bean:StoreOrdersComponent" /> > .... > > Then in each component I access databaseid with @Header("databaseId") > and use this id to fetch data from database. > > This works, but I feel like I'm overusing headers. Is there a better way? > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/Passing- > parameters-from-routes-to-components-tp5794341.html > Sent from the Camel - Users mailing list archive at Nabble.com.