matthewwilson / camel.js Goto Github PK
View Code? Open in Web Editor NEWA camel-like routing and integration framework for node.js.
Home Page: http://matthewcodes.github.io/blog/2015/05/09/camel-dot-js-an-introduction/
A camel-like routing and integration framework for node.js.
Home Page: http://matthewcodes.github.io/blog/2015/05/09/camel-dot-js-an-introduction/
Name | Default |
---|---|
fileFilter | null |
For the consumer, you can use it to filter filenames. So for example if you only want to consume text files you could set the value to "*.txt"
I don't think this would be needed for a producer?
Consumer Only
Name | Default |
---|---|
idempotent | false |
Use idempotent to skip files that have already been processed.
Consumer Only
Name | Default |
---|---|
moveFailed | null |
If an error occurs while processing a file move it to this directory. For example, to move files into a .error subdirectory use: .error.
Your module uses the Apache Software Foundation "Camel" trademark improperly. Can you rename it please?
Producer Only
Name | Default |
---|---|
fileExists | override |
What to do if a file already exists with the same name. The following values can be specified: Override, Append, Fail
Locally I am using node.js version 0.12.2, travis was using 0.10 and failed when I added code that used this function:
https://nodejs.org/api/fs.html#fs_fs_access_path_mode_callback
Which does not exist in earlier versions. We need to test against the latest 0.12 release and the stable 0.10 release.
Consumer Only
Name | Default |
---|---|
initialDelay | 0 |
Milliseconds before polling the file/directory starts.
Consumer Only
Name | Default |
---|---|
recursive | false |
If a directory, will look for files in all the sub-directories as well.
/Users/matthew/Dev/camel.js.runner/node_modules/camel.js/modules/processors/routeProcessor.js:13
throw err;
^
Error: EISDIR, read
at Error (native)
We need to add support for subdirectories
There is a built in library for processing endpoints, probably much more reliable than my code!
https://nodejs.org/docs/latest/api/url.html#url_url_parse_urlstr_parsequerystring_slashesdenotehost
Consumer Only
Name | Default |
---|---|
pollInterval | 0 |
If this value is greater than 0, the specified directory will be polled at this interval.
Consumer Only
Name | Default |
---|---|
preMove | null |
Directory path to move files into during processing, For example to move in-progress files into the order directory set this value to order.
Consumer Only
Name | Default |
---|---|
move | null |
Set this to the directory path you want files to be moved to if after processing. For example to move files into a .done subdirectory just enter .done.
Specifies the name of the file to write (relative to the endpoint directory)
Consumer Only
Name | Default |
---|---|
exclusionFileFilter | null |
For the consumer, you can use it to filter and exclude filenames. So for example if you dont want to consume text files you could set the value to "*.txt"
Consumer Only
Name | Default |
---|---|
delay | 0 |
Milliseconds before the next poll of the file/directory.
Name | Default |
---|---|
autoCreate | true |
Automatically create missing directories in the file's pathname. For the file consumer, that means creating the starting directory. For the file producer, it means the directory the files should be written to.
Node's fs.readFile and fs.writeFile might do this already, need to confirm.
Apache Camel uses a readLock option to help with this, perhaps there is a better way in node.
Consumer Only
Name | Default |
---|---|
delete | false |
If true, the file will be deleted after it is processed successfully.
We can currently read files from a directory but can only write to a single file. We need to be able to specify a to directory as well.
Consumer Only
Name | Default |
---|---|
watch | false |
If true we will watch the specified directory and process any new files that are added.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.