[
https://issues.apache.org/jira/browse/CAMEL-8688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14508940#comment-14508940
]
Geert Vanheusden commented on CAMEL-8688:
-----------------------------------------
Solution proposal by [~forsthofer]:
{quote}
My original proposal to copy the stream cache file is not the optimal
solution. A better solution would be to have only one stream cache
file and to delete this file only when all exchanges which need this
file are done. This does mean we have to register listeners to the
event onDone of all UnitOfWorks of the relevant exchanges in the
stream cache file object and only when all listeners have got the
onDone event, then the file can be deleted. However this will require
quite some changes
Probably we could also use this solution for the agregator and splitter case..
{quote}
> Removed StreamCache when doing a Wiretap
> ----------------------------------------
>
> Key: CAMEL-8688
> URL: https://issues.apache.org/jira/browse/CAMEL-8688
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.15.1
> Reporter: Geert Vanheusden
> Attachments: WireTapTest.java
>
>
> Hi,
> I noticed a bug where the body (StreamCache) was already removed before the
> exchange reached the end (in the Wiretap route).
> I added a test as an attachment.
> f you run the test you can clearly see the temp file deletion followed by the
> closed stream exception:
> Tried 1 to delete file:
> /var/folders/db/brq60fqj4vb8mnx_5nlz36nw0000gn/T/camel/camel-tmp-00cd1ce2-7d44-47fe-b357-008e8146f770/cos8797132745923044996.tmp
> with result: true
> Cannot reset stream from file
> /var/folders/db/brq60fqj4vb8mnx_5nlz36nw0000gn/T/camel/camel-tmp-00cd1ce2-7d44-47fe-b357-008e8146f770/cos8797132745923044996.tmp
> I encountered the same issue during a more complex route that does some
> splitting (zip file) and multicasting. This occurred on Camel 2.14.1 so it
> could be fixed by https://issues.apache.org/jira/browse/CAMEL-8284 but I need
> to test this.
> Kind regards,
> Geert
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)