FME Transformers: 2024.1

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 is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.

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.