FME Flow: 2024.2
WebSocket Channel
The WebSocket Channel external action receives messages and delivers them over TCP to WebSocket-supported clients that are connected to the FME Flow WebSocket Server or another target URL. Supported clients include:
- FME Form workspaces configured with WebSocketConnector transformers.
- HTML5-based web browsers, such as:
- Microsoft Edge
- Firefox 11+
- Chrome 16+
- Safari 6+
- Opera 12.10+
The WebSocket Channel external action has two output ports. The success port (✔) can send a message if the WebSocket channel is notified successfully. The failure port (x) can send a message if the notification fails.
Client Requirements
To receive data from the external action, clients must send the following preamble:
{
"ws_op" : "open",
"ws_stream_ids" : ["<stream_id1>", "<stream_id2>", "<stream_id3>", ...]
}
For more information, see WebSocket Server Messaging Protocol.
WebSocket Communication Channels
The WebSocket Server is located on the FME Flow Core. By default, FME Flow uses the following channels for WebSocket communication:
- Port: 7078
- URI: ws://<hostname>:7078/websocket
To configure the WebSocket server for SSL communication, see Configuring for HTTPS.
Parameters
- Target URL: This field is pre-populated with the URL of the WebSocket server on the FME Flow Core (included with your FME Flow installation). However, you can choose to connect to a different WebSocket server.
- Stream ID: Specify a Stream ID for the subscriber. The Stream ID allows the WebSocket server to uniquely identify message streams and connect them to the right requesting applications.
- Message: Specify the message to send. If specified, this message replaces the incoming message.
Output Attributes
See Also
Attribute | Description |
---|---|
time | Event time |
source | Event type |
error.type |
(Failure port only) Error type:
|
error.message | (Failure port only) Error message |
Retry
- Retry on failure: If checked, the automation attempts to run the action again if the initial attempt results in a failure to connect to the specified external resource for message delivery. The manner in which these retries are conducted is based on the remaining settings.
- Use custom retry settings: If checked, the remaining retry settings are configurable. If not checked, they are set to the FME Flow default values.
- Number of attempts: Maximum number of retries, if the action continues to fail.
- Wait between attempts: Time to wait between retries. In conjunction with Backoff multiplier (below), the specified value is the wait time for the first retry.
- Backoff multiplier: Factor by which to increase Wait between attempts on successive retries. For example, a value of 2.0 doubles the wait time for the next retry.
- Randomization factor: Percentage by which to introduce randomness to Wait between attempts. For example, if Wait between attempts is 100 Seconds, and Randomization factor is 25, the wait time for each retry is randomly selected between 75 and 125 seconds.
- Maximum wait between attempts: Maximum wait time between retries. In conjunction with Backoff multiplier, the specified value is the upper limit for wait time.