camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: Zip format problem
Date Sun, 04 Oct 2009 19:43:50 GMT
Vladimir Okhotnikov schrieb:
> The approach seems okay. The only thing that bothers me is that I'm still
> not sure the split/aggregate behavior is specific to compression, and will
> not be useful for other data formats.
>   
"split" and "aggregate" are already present in the DSL. That is why I 
first thought about using them. The question is if they can be used for 
this case. I guess
the extraction could be done in an expression like in the example
split(body(String.class).tokenize("\n"))
split(body(String.class).decompress(Zip))

The only thing is that I think decompress should work in a streaming way 
to handle large archives. I guess the above example would read the whole 
archive into a string.
> 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


Mime
View raw message