Work-in-Progress
The goal of this project is to enable WebSocket interface to NiFi so that, external clients can send data to a flow as well as NiFi can stream results back to clients like browsers. To simplify usage, STOMP over WebSocket protocol is used for client/server communication.
- VertxService is a NiFi service that opens WebSocket port and bridge the embedded vertx's EventBus.
- GetEventBus is a NiFi processor that subscribe to EventBus's address. all messages received on the address will be emitted into the flow.
- SendEventBus is a NiFi processor that sends flowFile to EventBus address (point-to-point). only one recipient will receive flowFile.
- PublishEventBus is a NiFi processor that publish flowFile to EventBus address (pub/sub). all subscribers on the address will receive flowFile.
- Manual: Download Apache NiFi binaries and unpack to a folder.
- On Mac: brew install nifi
# Assume you unpacked nifi-0.3.0-bin.zip to /Developer/Applications/nifi
./gradlew clean deploy -Pnifi_home=/Developer/Applications/nifi
On Mac
gradle clean deploy -Pnifi_home=/usr/local/Cellar/nifi/0.3.0/libexec
cd /Developer/Applications/nifi
./bin/nifi.sh start
./bin/nifi.sh stop
On Mac
# nifi start|stop|run|restart|status|dump|install
nifi start
nifi status
nifi stop
# Working Directory: /usr/local/Cellar/nifi/0.3.0/libexec
- check if SockJS server is up: http://hostname:{port}/{eventbus}/info
- test evenBus via web page: test.html
- test with flow: WebSocketFlow.xml
- Try HazelcastClusterManager and Vertx.clusteredVertx to see if vertx clustering is possible with NiFi cluster.
- Support ability to publish multiple types of messages. i.e., primitives, string, buffers, JSON