Skip to main content

PutWebSocket

Description

Sends messages to a WebSocket remote endpoint using a WebSocket session that is established by either ListenWebSocket or ConnectWebSocket.

Tags

WebSocket, publish, send

Properties

In the list below required Properties are shown with an asterisk (*). Other properties are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
WebSocket Session Id *websocket-session-id${websocket.session.id}A NiFi Expression to retrieve the session id. If not specified, a message will be sent to all connected WebSocket peers for the WebSocket controller service endpoint.

Supports Expression Language, using FlowFile attributes and Environment variables.
WebSocket ControllerService Id *websocket-controller-service-id${websocket.controller.service.id}A NiFi Expression to retrieve the id of a WebSocket ControllerService.

Supports Expression Language, using FlowFile attributes and Environment variables.
WebSocket Endpoint Id *websocket-endpoint-id${websocket.endpoint.id}A NiFi Expression to retrieve the endpoint id of a WebSocket ControllerService.

Supports Expression Language, using FlowFile attributes and Environment variables.
WebSocket Message Type *websocket-message-typeTEXTThe type of message content: TEXT or BINARY

Supports Expression Language, using FlowFile attributes and Environment variables.

Dynamic Properties

This component does not support dynamic properties.

Relationships

NameDescription
failureFlowFiles that failed to send to the destination are transferred to this relationship.
successFlowFiles that are sent successfully to the destination are transferred to this relationship.

Reads Attributes

This processor does not read attributes.

Writes Attributes

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

State Management

This component does not store state.

Restricted

This component is not restricted.

Input Requirement

This component requires an incoming relationship.

System Resource Considerations

ScopeDescription
MEMORYAn instance of this component can cause high usage of this system resource. Multiple instances or high concurrency settings may result a degradation of performance.

See Also