You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
I'm trying to read ZIP file with jberet
M'y first step use a camelItemReader to copy remote file localy with camel-ftps component.
Just for test I'm use file to file with camel file reader and writer <step id="simple.step1"> <chunk item-count="1"> <reader ref="camelItemReader"> <properties> <property name="beanType" value="java.io.InputStream" /> <property name="timeout" value="6000" /> <property name="endpoint" value="file:target/data/?preMove=.inprogress/&move=../.done&include=test.xml"/> </properties> </reader> <writer ref="camelItemWriter"> <properties> <property name="endpoint" value="file:target/in/?fileName=toto.xml" /> </properties> </writer> </chunk> </step>
It works but ...
I have a problem with the timeout property. With a short delay I'm not sure if the file was downloaded correctly (process aborted)
With a long wait time I'm sure which file to download but the process does not end when the first file is downloaded and if a second file is available it is also downloaded.
How do I download only one file and wait long enough to be sure that the download will not be interrupted?
Thank
The text was updated successfully, but these errors were encountered:
item reader typically reads a series of data items (many files in your case). If you only want to read one single file from the source, you probably don't need batch processing. If you still want to use this item reader, you can extend CamelItemReader by adding a counter. Once the reader has read the specified number of items, the next readItem call will return null to signal the end of reading operation.
Hi
I'm trying to read ZIP file with jberet
M'y first step use a camelItemReader to copy remote file localy with camel-ftps component.
Just for test I'm use file to file with camel file reader and writer
<step id="simple.step1"> <chunk item-count="1"> <reader ref="camelItemReader"> <properties> <property name="beanType" value="java.io.InputStream" /> <property name="timeout" value="6000" /> <property name="endpoint" value="file:target/data/?preMove=.inprogress/&move=../.done&include=test.xml"/> </properties> </reader> <writer ref="camelItemWriter"> <properties> <property name="endpoint" value="file:target/in/?fileName=toto.xml" /> </properties> </writer> </chunk> </step>
It works but ...
I have a problem with the timeout property. With a short delay I'm not sure if the file was downloaded correctly (process aborted)
With a long wait time I'm sure which file to download but the process does not end when the first file is downloaded and if a second file is available it is also downloaded.
How do I download only one file and wait long enough to be sure that the download will not be interrupted?
Thank
The text was updated successfully, but these errors were encountered: