Giter VIP home page Giter VIP logo

camel-fastfile's Introduction

#Camel Fast File Consumer

This project contains example org.apache.camel.component.file.GenericFileExclusiveReadLockStrategy implementations that speed up file consumption when the only options for determining a read lock are the 'changed' strategy.

##Requirements

##Building Example

Run the Maven build

~$ cd $PROJECT_ROOT
~$ mvn clean install

##Running Camel

Run the Maven Camel Plugin

~$ cd $PROJECT_ROOT
~$ mvn camel:run

You can also pass in extra JVM args to bump logging and point to an external config file

~$ cd $PROJECT_ROOT
~$ mvn camel:run -Dorg.slf4j.simpleLogger.log.org.apache.camel.component.file=debug -DconfigFile=$HOME/myConfig.properties

##Testing

Simply write a file into the configured "input" directory. To really see things work, you'll want to simulate a slow writer. To do so, you can use the following bash command in a separate terminal window:

~$ cd $HOME/input #Replace this with your configured "input" directory.
~$ while [ 0 -eq 0 ]; do echo 'foo' >> file01.txt; sleep 0.5; done;

Create as many of these "slow writers" as you'd like (using separate terminal windows and unique file names for each) to simulate multiple files being written simultaneously. The files should not be picked up by the Camel routes until you kill the writer script. Once you do, the Camel route will detect that the file has stopped changing and will pick it up.

camel-fastfile's People

Contributors

joshdreagan avatar

Watchers

Harish avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.