Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xmlking/nifi-websocket
Apache NiFi WebSocket Listener
https://github.com/xmlking/nifi-websocket
Last synced: about 1 month ago
JSON representation
Apache NiFi WebSocket Listener
- Host: GitHub
- URL: https://github.com/xmlking/nifi-websocket
- Owner: xmlking
- License: apache-2.0
- Created: 2015-09-27T01:00:00.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-18T10:23:02.000Z (over 8 years ago)
- Last Synced: 2024-05-01T20:22:18.732Z (2 months ago)
- Language: Java
- Homepage:
- Size: 227 KB
- Stars: 10
- Watchers: 5
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Lists
- awesome-nifi - xmlking/nifi-websocket - Apache NiFi WebSocket Listener (Processors and Bundles / Mailing List Best Of)
- awesome-nifi - xmlking/nifi-websocket - Apache NiFi WebSocket Listener (Processors and Bundles / Mailing List Best Of)
- awesome-nifi - xmlking/nifi-websocket - Apache NiFi WebSocket Listener (Processors and Bundles / Mailing List Best Of)
README
# NiFi-WebSocket
```python
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](http://jmesnil.net/stomp-websocket/doc/) protocol is used for client/server communication.
1. **VertxService** is a NiFi service that opens **WebSocket** port and bridge the embedded [vertx's](http://vertx.io/) **EventBus**.
2. **GetEventBus** is a NiFi processor that subscribe to **EventBus's** address. all messages received on the address will be emitted into the flow.
3. **SendEventBus** is a NiFi processor that sends flowFile to **EventBus** address (point-to-point). only one recipient will receive flowFile.
4. **PublishEventBus** is a NiFi processor that publish flowFile to **EventBus** address (pub/sub). all subscribers on the address will receive flowFile.### Install
1. Manual: Download [Apache NiFi](https://nifi.apache.org/download.html) binaries and unpack to a folder.
2. On Mac: brew install nifi### Deploy
```bash
# Assume you unpacked nifi-0.3.0-bin.zip to /Developer/Applications/nifi
./gradlew clean deploy -Pnifi_home=/Developer/Applications/nifi
```
On Mac
```bash
gradle clean deploy -Pnifi_home=/usr/local/Cellar/nifi/0.3.0/libexec
```### Run
```bash
cd /Developer/Applications/nifi
./bin/nifi.sh start
./bin/nifi.sh stop
```
On Mac
```bash
# nifi start|stop|run|restart|status|dump|install
nifi start
nifi status
nifi stop
# Working Directory: /usr/local/Cellar/nifi/0.3.0/libexec
```
### Test1. check if SockJS server is up: http://hostname:{port}/{eventbus}/info
2. test evenBus via web page: [test.html](./test.html)
3. test with flow: [WebSocketFlow.xml](./WebSocketFlow.xml)### TODO
1. Try HazelcastClusterManager and Vertx.clusteredVertx to see if vertx clustering is possible with NiFi cluster.
2. Support ability to publish multiple types of messages. i.e., primitives, string, buffers, JSON