Whenever I start a Camel route from a file
URI, I see that Camel obtains a "lock" on the file. For instance, if the file is named myinput.xml
, then Camel creates a "lock file" on it, in the same directory, called myinput.xml.camelLock
.
The Processor is used for processing message Exchanges. The processor is a core Camel concept that represents a node capable of using, creating, or modifying an incoming exchange.
Apache Camel is an open source framework that provides rule-based routing and mediation engine. Apache Camel essentially provides an implementation of various EIPs. It makes integration easier by providing connectivity to a very large variety of transports and APIs.
Hope this helps you my friend
readLocks is used by consumers, to only poll the files if it has exclusive read-lock on the file (i.e. the file is not in-progress or being written). Camel will wait until the file lock is granted after that Camel creates a marker file and then holds a lock on it camel maintain that lock as JDK IO API cannot always determine whether a file is currently being used by another process. The option readLockCheckInterval can be used to set the check frequency. This option is only avail for the FTP component from Camel 2.8 onwards. Notice that from Camel 2.10.1 onwards the FTP option fastExistsCheck can be enabled to speedup this readLock strategy.
Notice from Camel 2.10 onwards the read locks changed, fileLock and rename will also use a markerFile as well, to ensure not picking up files that may be in process by another Camel consumer running on another node (eg cluster). This is only supported by the file component (not the ftp component).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With