WebSocket Channel
The WebSocket Channel external action receives messages and delivers them over TCP to WebSocket-supported clients that are connected to the FME Server WebSocket Server or another target URL. Supported clients include:
- FME Desktop workspaces configured with WebSocketReceiver transformers.
- HTML5-based web browsers, such as:
- Internet Explorer 10+
- 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.
Note: When Retry settings are configured, the failure port renders with a Retry Configured (⟳) icon.
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 Server Core. By default, FME Server 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
Note: See also Working with Parameters in Automations Workflows.
Tip: To test that your parameters work as expected, click Validate.
- Target URL: This field is pre-populated with the URL of the WebSocket server on the FME Server Core (included with your FME Server 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 Keys
See Also
Tip: To view the output keys from upstream components, click Show Upstream Keys.
Key | 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 Server 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.
See Also