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

Claus Ibsen commented on CAMEL-1849:
------------------------------------

Dave, yeah a good idea to store the content as a String instead to detach it 
from the underlying stream.

As it only occurs when an exception is to be thrown then the overhead is 
negligible.

Maybe the stream should be closed as part of the exchange unit of work 
terminating?
We do that for instance with other components where they do house cleaning.

And removing temporary work files would make sense to do in this part as well. 
And I do believe the code could use an overhaul as well since its a bit 
_tricky_ in places.
For instance generating the temporary filename should just use the exchange id 
as its unique and a much better name than a generated number. 

I would take a 2nd look and ping back ideas

> CachedOutputStream not cleaning up tmp files when using file based caching
> --------------------------------------------------------------------------
>
>                 Key: CAMEL-1849
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1849
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core, camel-http
>    Affects Versions: 1.6.1
>         Environment: Camel 1.x branch. 2.0 branch also appears to have the 
> same problem
>            Reporter: Dave Stanley
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.6.2
>
>         Attachments: camel_1.x_patch.txt
>
>
> A recent feature of Camel's CachedOutputStream is to serialize any messages 
> over 64k to disk. In some cases the *tmp message files are not being cleaned 
> up. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to