ConnectWebSocket

Description:

Acts as a WebSocket client endpoint to interact with a remote WebSocket server. FlowFiles are transferred to downstream relationships according to received message types as WebSocket client configured with this processor receives messages from remote WebSocket server. If a new flowfile is passed to the processor, the previous sessions will be closed and any data being sent will be aborted.

Additional Details...

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.

Display NameAPI NameDefault ValueAllowable ValuesDescription
WebSocket Client ControllerServicewebsocket-client-controller-serviceController Service API:
WebSocketClientService
Implementation: JettyWebSocketClient
A WebSocket CLIENT Controller Service which can connect to a WebSocket server.
WebSocket Client Idwebsocket-client-idThe client ID to identify WebSocket session. It should be unique within the WebSocket Client Controller Service. Otherwise, it throws WebSocketConfigurationException when it gets started.

Relationships:

NameDescription
successFlowFile holding connection configuration attributes (like URL or HTTP headers) in case of successful connection
text messageThe WebSocket text message output
binary messageThe WebSocket binary message output
failureFlowFile holding connection configuration attributes (like URL or HTTP headers) in case of connection failure
connectedThe WebSocket session is established

Reads Attributes:

None specified.

Writes Attributes:

NameDescription
websocket.controller.service.idWebSocket Controller Service id.
websocket.session.idEstablished WebSocket session id.
websocket.endpoint.idWebSocket endpoint id.
websocket.local.addressWebSocket client address.
websocket.remote.addressWebSocket server address.
websocket.message.typeTEXT or BINARY.

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component allows an incoming relationship.

System Resource Considerations:

None specified.