Alexander Lex created CAMEL-18739:
-------------------------------------

             Summary: ZipAggregationStrategy loses onCompletion
                 Key: CAMEL-18739
                 URL: https://issues.apache.org/jira/browse/CAMEL-18739
             Project: Camel
          Issue Type: Bug
          Components: camel-zipfile
    Affects Versions: 3.19.0
            Reporter: Alexander Lex
         Attachments: zipaggregator-oncomplete.7z

We are facing an issue where we end up with stale files in the temp directory 
(on Windows: C:\Users\...\AppData\Local\Temp). This stops our application from 
running.

 

Problem description:

When using "Split Definition" with "ZipAggregationStrategy", we try to 
aggregate multiple parts in one zip archive. Our Code does exactly that and 
works fine, but it misses the step to delete the temporaly created archive 
(created automactly) in the temp directory after completion.

 

We would expect that the completion of the route does the deletion.

 

Having a look in into the code, we saw that the "ZipAggregationStrategy" does 
have a "DeleteZipFileOnCompletion", which does exactly that. The "OnCompletion" 
is also added to the exchange. However,  the deletion is never executed, due to 
a copy of the subexchange to the original exchange (losing the previously added 
onComplete)

 

Attached you can find code to reproduce the issue.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to