camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From demetrios <>
Subject consumerTemplate.receive function on same file hanging.
Date Thu, 01 Nov 2012 03:55:04 GMT
Hi All
I am new to camel and currently have an issue with a fileConsumer I have

I am using camel to read in a message file via a route.  As part of this I
am using the body received in this file to read to acquire a file location
defined in the body.    I then want camel to take this value and read in a
new body from another file.

Here is what my consumer routine looks like:

    public void hello(@Header("Camel.File") String filePath, @Body String
body, Exchange exchange){
        int lastSlash =
        String path = filePath.substring(0, lastSlash);
        String fileName = filePath.substring(1+lastSlash);
        Exchange newExchange =


This works fine one the first run for a particular file however if I want to
reprocess that message in the same instance to the same file, the call :

I have debugged into the receive call and it seems that the file read in
earlier is still locked by the previous run.

Does anyone have any ideas on what I am missing here?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message