FAQ
(Sorry for my poor english)

I'm working with file consumer.
I need to filter(bean style, #) files in file consumer.
And the filter has some variables.
How can i set variables in the filter?

I tested route like this
*
*
*from("file://somedir?move=done")*
*.process(new Processor()*
*{*
* @Override*
* public void process(Exchange exchange) throws Exception*
* {*
* exchange.setProperty("propKey", "propVal"); // used in
filter(myFilter)*
* }*
*})*
*.filter().method("**myFilter**", "isAccept")*
*.to("bean:somebean"); *
*
*
But this case result that all file moved done directory whether filter
return true or false.
This is not my intention.

I want to process some files that accept some conditions and the other
files doesn't touch.

Supplement)
Of course, i can set instance variables in the bean.
But my application run multiple route(same consumer) and different
environment(filters, directories and condition),
so instance variables is not accepted.

Please help.
Thank you.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
groupusers @
categoriescamel
postedSep 27, '12 at 10:56a
activeSep 27, '12 at 6:06p
posts3
users2
websitecamel.apache.org

2 users in discussion

Christian Müller: 2 posts Jason Shim: 1 post

People

Translate

site design / logo © 2021 Grokbase