Add an extra parameter to your doHandleCsvData() method and annotate it with @Header("CamelFileName"). Like this:
public class MyCsvHandler { public void doHandleCsvData(@Body String body, @Header("CamelFileName") String fileName) { // your custom logic } } See the Bean Binding page for more info http://camel.apache.org/bean-binding.html, alos checkout the annotations on http://camel.apache.org/parameter-binding-annotations.html Regards, Richard On Sat, Dec 28, 2013 at 5:40 PM, keepcl123 <keepcl...@gmail.com> wrote: > Hi , > > I want to do File Poller of CSV, then unmarshaling.like this: > <route> > > <from > > uri="file:///some/path/to/pickup/csvfiles?delete=true&consumer.delay=10000" > /> > <unmarshal><csv /></unmarshal> > <to uri="bean:myCsvHandler?method=doHandleCsvData" /> > </route> > > But I also want to get *also *the *file name* in my bean. > How do I do this ? > > Thx > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/File-Poller-of-CSV-tp5745296.html > Sent from the Camel - Users mailing list archive at Nabble.com. >