You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/12/14 17:56:00 UTC

[jira] [Commented] (CAMEL-18739) ZipAggregationStrategy loses onCompletion

    [ https://issues.apache.org/jira/browse/CAMEL-18739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17647649#comment-17647649 ] 

Claus Ibsen commented on CAMEL-18739:
-------------------------------------

Did the same fix for camel-tarfile

> 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
>            Priority: Minor
>             Fix For: 3.20.0
>
>         Attachments: zipaggregator-oncomplete.zip
>
>
> 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)