Nifi-Camel are some experimental processors for Apache Nifi that uses Apache Camel to produce and consume messages. These processors are initially based on Assimbly Connector, but it's forking quickly.
Use these experimental processors at your own risk, because you may really quickly write some integration mixture that won't comply anymore with Apache Nifi registry concepts, so use these experimental processors only and only if, you really understand and accept these limitations.
- Build the NAR : mvn install
- Put the NAR file in the Nifi lib directory : cp nifi-camel-nar/target/nifi-camel-nar-1.11.4.nar ..../nifi-1.11.4/lib/
- For older installations of Nifi (before version 1.9) you need to restart Nifi.
All the Camel messaging patterns can be used, thanks to these 3 processors:
- CamelContext - autonomous processor, loading Java and/or DSL Camel routes. It must be deployed only once per Camel context to load.
- GetWithCamel - processor to consume Camel bind point (can be a component or end of route "direct-vm:output"...). This processor is downstream only.
- PutWithCamel - processor to submit to Camel bind point (can be a component or begining of route "direct-vm:input"...). This component can be used, in Camel terminology as InOut or InOnly, in Nifi terminology, with upstream, and with or without downstream.
Camel InOnly-Out (loosely coupled)
- Adapt nifi-camel-deps/pom.xml to embed the Camel components you need.
- Code the Camel routes you want, in Java or in Camel DSL, make them available in nifi-camel-deps/src/main/resources/somecontext.xml
- Add the Spring context filename to nifi-camel-processors/src/main/java/org/wareld/nifi/camel/processors/CamelContext.java CTX_CONFIG_PATH allowed values.
- build and deploy.
- Add CamelContext processor, with selected application context, and "Run Schedule = 12 hours".
- expression support.
- from Nifi to Camel.
- from Camel to Nifi.
For the URI format of the camel component see Camel's component reference. For example to use File uri: file://C/out