camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hefiso <>
Subject Re: File2: maxMessagesPerPoll combined with readLock=changed
Date Wed, 24 Apr 2013 19:18:40 GMT

The setting maxMessagesPerPoll is actually respected but the files will only
be processed one by one with a delay matching readLockTimeout. This
behaviour is happening because the method acquireExclusiveReadLock in
FileChangedExclusiveReadLockStrategy effectively calls
Thread.sleep(checkInterval) for a single file. When using a high setting for
readLockTimeout, say 10 seconds, then the throughput really suffers.

This is also the case with FileRenameExclusiveReadLockStrategy (since it
extends GenericFileRenameExclusiveReadLockStrategy<File>) because it also
calls Thread.sleep when processing a single file. 

I don't see a quick fix for this since the Thread.sleep must be performed at
a higher level than on a single file (i.e. after trying to process all the
files in the collection given by the poll).

I will log a JIRA shortly.

Best regards

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

View raw message