WebSocket

The WebSocket feed type consumes messages from an externally accessible WebSocket server. The WebSocket protocol enables two-way low-latency communication between a client and server. It does this by establishing persistent socket connections between a server and client in which the server sends data to connected clients. In this case, ArcGIS Velocity acts as the WebSocket client.

Example

The following is an example use case for the feed:

Updated sensor values are sent from a WebSocket server.

Usage note

Keep the following in mind when working with the feed:

After configuring feed connection parameters, refer to configuring input data to learn how to define the schema and the key parameters.

Parameters

The following are the parameters for the feed:

ParameterDescriptionData Type
URL

(Required)

The WebSocket URL from which to connect and receive data.

String

Custom headers

(Optional)

Optional custom headers to be included in the WebSocket request sent to the specified WebSocket endpoint.

For example, custom headers can be used to specify a third-party API key or authorization header.

Key-Value pair

Ignore first message received

(Optional)

Ignores the first message received over the WebSocket connection. Sometimes, a server sends a subscription confirmation message before actual data. By ignoring the first message, which is often a subscription message, Velocity ensures that only valid features and data are sampled and processed. The default is False.

Boolean

Subscription message

(Optional)

Configures a subscription message to be sent whenever the WebSocket feed connects or reconnects.

String

Consideration and limitation

Consider the following when using the feed:

The WebSocket server must be externally accessible on the internet.