Files size after simply route from file to file is smaller then the original 
size.
----------------------------------------------------------------------------------

                 Key: CAMEL-1844
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1844
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.0-M2
         Environment: Java: 1.6.0.14
OS: Linux, Kubuntu 9.04
Intel Core Duo (2x2,5GHz), 4GB ram 
            Reporter: Rafal Janik


I've got very simply camel route:

CamelContext context = new DefaultCamelContext();
context.addRoutes(new RouteBuilder() {
  public void configure() {
    from("file://" + INBOX_DIR + "?noop=false").to("file://" + OUTBOX_DIR);
  }
});
context.start();

All this route does, is to copy a file from INBOX_DIR to OUTBOX_DIR.

And everything goes fine for smaller files, but when I put something bigger 
into INBOX_DIR (on my machine problem starts with files bigger than ~100MB) 
things go wrong.
The file in OUTBOX_DIR has different size than the original one. In general it 
is smaller than the original (its size varies - can be 3/4 of the original, can 
be 1/2 etc).
With Camel 1.6.1 with noop set to "true" the file in OUTBOX was bigger than the 
original one (even 1,5-2 times larger !). With Camel 2.0-M2 setting noop to 
true or false didn't matter - the file in OUTBOX was smaller than the original 
one.

It is possible to avoid this bug, by setting delay but this is no good. To 
handle large files, I'd have to set a very high value which would slow down the 
whole application.

I've tried all possible configurations noop=true/false, readLock, 
readLockTimeout but without success.

Tested on both Apache Camel 1.6.1 and 2.0-M2 with similar results.


My environment:
Java: 1.6.0.14
OS: Linux, Kubuntu 9.04


Attached you will find a Maven project which exposes the bug.
Unpack it, run
mvn assembly:assembly
next run
run.sh
and copy big file to inbox dir and observe resulting file in outbox dir.

To kill the application hit CTRL+C 

-- 
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