Stephan Siano created CAMEL-13168:
-------------------------------------

             Summary: Underlying File for StreamCache gets deleted too early 
with direct-vm
                 Key: CAMEL-13168
                 URL: https://issues.apache.org/jira/browse/CAMEL-13168
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.23.1
            Reporter: Stephan Siano
            Assignee: Stephan Siano


If one route calls a different route via direct-vm endpoint and the second 
route creates a StreamCache based for a file in the called route but the 
payload is propagated back to the calling route, this route will not be able to 
call the file because it is already deleted.

The issue is actually the same as for CAMEL-7787. As the multicast processor 
the direct-vm processor creates a copy of the exchange and does perform the 
further processing with this exchange till the route comes back. The stream 
cache will create a synchronization on this second exchange to delete the file 
when the exchange is done, but the StreamCache as an entity (then without 
underlying file) might be handed back to the original exchange.

The fix is actually the same as for CAMEL-7787, set the exchange property 
Exchange.STREAM_CACHE_UNIT_OF_WORK to the LUW of the initial exchange.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to