FME Transformers: 2024.2

Categories
Web

Web

Workflows
Related Transformers
KafkaConnector
MQTTConnector

WebSocketConnector

Connects to a WebSocket server to send or receive messages.

Jump to Configuration

Typical Uses

  • Receive messages from WebSocket Servers
  • Send messages to WebSocket Servers
  • Connect to FME Flow WebSocket Servers

How does it work?

The first input feature will cause the WebSocketConnector to initialize a connection to the specified WebSocket Server URL.

A ping message is sent to the server every 60 seconds to maintain the connection.

When Request > Action is Send, the specified Data to Transmit value will be sent to the WebSocket server for every input feature, including the first feature that initiated the connection.

When Request > Action is Receive, a feature will be produced each time a message is received, with the contents of the message in the _output attribute. Each incoming feature will cause the WebSocketConnector to initialize a connection to the specified WebSocket server. The transformer will block while it waits to receive WebSocket messages until the remote host closes the connection.

When Receive Mode is Batch, each input feature will only block until the specified number of messages is received. If set to Stream, the transformer will continue running until the host closes the connection.

Configuration

Input Ports

Output Ports

Parameters

The remaining parameters available depend on the value of the Request > Action parameter. Parameters for each Action are detailed below.

Editing Transformer Parameters

Transformer parameters can be set by directly entering values, using expressions, or referencing other elements in the workspace such as attribute values or user parameters. Various editors and context menus are available to assist. To see what is available, click beside the applicable parameter.

For more information, see Transformer Parameter Menu Options.

Reference

Processing Behavior

Feature-Based

Feature Holding

No

Dependencies  
Aliases  
History  

FME Community

The FME Community has a wealth of FME knowledge with over 20,000 active members worldwide. Get help with FME, share knowledge, and connect with users globally.

Search for all results about the WebSocketConnector on the FME Community.

 

Examples may contain information licensed under the Open Government Licence – Vancouver, Open Government Licence - British Columbia, and/or Open Government Licence – Canada.