Hi,
couldn't you process the files by using a content based router at the
filepolling endpoint? Sth like
from("file:directory")
.choice()
.when(header("filename").isEqualTo("a.txt"))
.to("direct:a")
.when(header("filename").isEqualTo("b.txt"))
.to("direct:b")
.otherwise()
.to("direct:unknown");
instead of direct you can also use jms endpoint to asynch process
different files.
regards Marco
Am 14.07.2011 15:02, schrieb divanmostert:
Hi Claus,
I can see why it is bad to have multiple Endpoints consuming files from the
same directory, but if they are restricted to load a single file each, then
surely that should be ok. Each file will only be picked up once, so no
threading issues.
I also can't just have one endpoint to load all files from a directory,
cause I'm only interested in a subset and each will have to follow a
specific route.
Its generally bad practice to have concurrent consumers compete for
the same files.
--
View this message in context:
http://camel.465427.n5.nabble.com/Loading-multiple-files-from-the-same-directory-tp4585994p4586541.html
Sent from the Camel - Users mailing list archive at Nabble.com.