Hi Carsten, I think that the PropertiesComponent [1] will be your friend.
[1] http://camel.apache.org/properties.html Regards, Tobias ----- Original Message ----- > From: "Carsten Erker" <carsten.er...@akquinet.de> > To: users@camel.apache.org > Sent: Tuesday, April 30, 2013 5:22:13 PM > Subject: How to dynamically configure directory on file consumer > > Hi, > > we got a route starting with a File consumer (from("file://input"...) > and a requirement to have the input directory configurable, i.e. in > our application there is some admin functionality to change the > directory which the file consumer is polling. This is stored in the > database. I guess this is a fairly common use case, though I > couldn't really find much in the docs / the Camel book, etc. > > From what I found I think I have to stop the route, do some magic and > start it again. For the magic I tried setting properties on the > FileEndpoint, FileConsumer, RouteContext, etc. After restart it > always polls the original directory. > > How is the proposed way to do this? > > Thanks in advance > Carsten