Description:
Acts as a WebSocket server endpoint to accept client connections. FlowFiles are transferred to downstream relationships according to received message types as the WebSocket server configured with this processor receives client requests
Tags:
subscribe, WebSocket, consume, listen
Properties:
In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values.
Name | Default Value | Allowable Values | Description |
WebSocket Server ControllerService | Controller Service API: WebSocketServerService Implementation: JettyWebSocketServer | A WebSocket SERVER Controller Service which can accept WebSocket requests. | |
Server URL Path | The WetSocket URL Path on which this processor listens to. Must starts with '/', e.g. '/example'. |
Relationships:
Name | Description |
text message | The WebSocket text message output |
binary message | The WebSocket binary message output |
connected | The WebSocket session is established |
Reads Attributes:
None specified.
Writes Attributes:
Name | Description |
websocket.controller.service.id | WebSocket Controller Service id. |
websocket.session.id | Established WebSocket session id. |
websocket.endpoint.id | WebSocket endpoint id. |
websocket.local.address | WebSocket server address. |
websocket.remote.address | WebSocket client address. |
websocket.message.type | TEXT or BINARY. |
State management:
This component does not store state.
Restricted:
This component is not restricted.
How to configure?:
Step 1: Drag and drop the ListenWebSocket processor to canvas.
Step 2: Double click the processor to configure,the configuration dialog will be opened as follows:
Step 3: Check the usage of each property and update those values.
Properties and Usage:
WebSocket Server ControllerService: Used to specify the WebSocket server controller service which can accept WebSocket requests.
Server URL Path: Used to specify the WebSocket URL path which the processor listens to. Eg: /example
For example, if you want to listen WebSocket server which listens 60028 port number and the URL path is /echo.
WebSocket SERVER controller service: