Amjath Sharief created CAMEL-12067:
--------------------------------------

             Summary: Bulk file processing and sending using ProducerTemplate 
throws RuntimeCamelException
                 Key: CAMEL-12067
                 URL: https://issues.apache.org/jira/browse/CAMEL-12067
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.20.1
            Reporter: Amjath Sharief


While trying to process files from local file system and sending it to another 
endpoint using ProducerTemplate works fine for less number of files say, 
50-100. But if the local file system has 1000s of files then get 
CamelRuntimeException very frequently. The following error occurs when this 
exception is thrown.

org.apache.camel.RuntimeCamelException: Cannot reset stream from file 
C:\Users\AMJATH~1\AppData\Local\Temp\camel\camel-tmp-137893a9-eb50-4da3-8067-d5c0e658c891\cos230445270759155558.tmp
        at 
org.apache.camel.converter.stream.FileInputStreamCache.reset(FileInputStreamCache.java:88)
        at 
org.apache.camel.processor.CamelInternalProcessor$StreamCachingAdvice.before(CamelInternalProcessor.java:806)
        at 
org.apache.camel.processor.CamelInternalProcessor$StreamCachingAdvice.before(CamelInternalProcessor.java:789)
        at 
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:149)
        at 
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
        at 
org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
        at 
org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:186)
        at 
org.apache.camel.impl.ProducerCache.asyncDispatchExchange(ProducerCache.java:494)
        at 
org.apache.camel.impl.ProducerCache.lambda$asyncSendExchange$1(ProducerCache.java:335)
        at 
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:445)
        at 
org.apache.camel.impl.ProducerCache.asyncSendExchange(ProducerCache.java:309)
        at 
org.apache.camel.impl.DefaultProducerTemplate.lambda$asyncSendExchange$3(DefaultProducerTemplate.java:667)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to