Hi, I just added an example at https://github.com/jimmidyson/camel-examples/tree/master/zip-file-processing. This example creates the zip file first (so that it's repeatable) & then does pretty much what you're doing: read from file uri, unmarshal, log each file contents (careful with large files) & finally writes each file to a file. Seems to be doing what it should...
Few questions if the example doesn't help you: - Are there any hints in the logs (try increasing logging level if not)? - If the file is back in the source dir does it try to process again? - Is there anything in the .error (moveFailed dir)? - Could the source file be being updated while you're processing it - if so, can you try the preMove option? Thanks, On 2 September 2014 08:46, Walzer, Thomas <[email protected]> wrote: > Hi Sven, > > I seem to have a similar problem. I also use 2.13.2. > My code is almost identical. The only difference is my in-url, that looks > like: > > file:////someserver/somedir/in?move=archive/${date:now:yyyyMMdd}/${file:name}.${date:now:HHmmss}&antInclude=*.ZIP > > I get a random number of retrievals (about 4-20) and therefore the same > number of files in the „archive“ directory. The timestamps are 6 seconds > apart. > > Cheers, Thomas. > > Am 02.09.2014 um 08:44 schrieb Sven Nold <[email protected]>: > > > Hi Guys, > > > > I am trying to read Zipentries and process them separately. But using > the file component it seems the file is not correctly closed. I can see the > file for a few seconds in the .done and source directory. But then it > disappears in the .done folder and is back in the source directory : > > > > > > <bean id="zipFileDataFormat" > class="org.apache.camel.dataformat.zipfile.ZipFileDataFormat"> > > <property name="usingIterator" value="true" /> > > </bean> > > > > <route id="readZip"> > > <from > uri="file://C:/temp/?fileName=any.zip&moveFailed=.error&move=.done&delay=10000" > /> > > <unmarshal ref="zipFileDataFormat" /> > > <!-- <split streaming="true"> --> > > <!-- <simple>$simple{body}</simple> --> > > <!-- <to > uri="log://OUT?level=INFO&showAll=true&multiline=true" /> --> > > <!-- </split> --> > > <to uri="log://OUT?level=INFO&showAll=true&multiline=true" > /> > > </route> > > > > If I remove the unmarshal the file component works fine (it moves > processed file to .done). > > > > Any Ideas? I guess I could do a workaround by using noop=true and moving > the file myself, but it would be nice if it works as expected. > > > > Best regards, > > > > Sven > >
