Hi Vladimir,

looks almost good. The problem is though that the second route already starts processing while the first route still unpacks the zip. We had to use a special marker file and a special filter for the files to make sure it waits till the zip is fully unpacked. Our solution was quite special though.

I think a general solution could be to somehow block the second route while the first route is active. I have no idea though if this can be done with camel. Any ideas?

Greetings

Christian

Vladimir Okhotnikov schrieb:
After having slept on it, I think that since you will have to resort to use
disk as a kind of cache anyway in general case, you can just as well do

from(...).uncompress(Zip).to("file://tempCacheFolder?...");
from("file://tempCacheFolder?sort=${file:name}").process(...

Which means it is actually not worth it to create more elaborate solution
for extracting files from zip archives in particular order, given the
considerations that it a) would not work without penalty on solid archives
and b) is probably kind of rare requirement - in some cases sorting of
unarchived files is irrelevant, in other it is possible to reorder
processing results before aggregation instead.

What do you think?


Christian Schneider wrote:
Vladimir Okhotnikov schrieb:
Christian Schneider wrote:
Btw. In our scenario we had the requirement that the files from the zip had to be processed in a certain order. In our case the processing should be done in order of the filenames.
Any idea how this could be expressed?

decompress(Zip).resequencer()... ?
Logically this would work but I fear it could consume much memory. Resequencer can“t be made streaming but perhaps it can use a disk.

Greetings

Christian





--

Christian Schneider
---
http://www.liquid-reality.de






--

Christian Schneider
---
http://www.liquid-reality.de

Reply via email to