Skip to main content

TCP (Client)

The TCP (Client) output in ArcGIS Velocity sends events formatted as delimited text and JSON to a TCP server using a TCP socket connection. You can find this output listed under the Web and Messaging options.

Example

The following is an example use case for the output:

A weather monitoring system streams real-time temperature and humidity data from remote sensors. The data is sent in delimited text format through the TCP (Client) output to a cloud-based dashboard server for real-time visualization. Each sensor station connects using its own port to keep the data organized.

Usage notes

Keep the following in mind when working with the output:

  • Velocity supports multiple output data formats. These include JSON, GeoJSON, EsriJSON, and delimited text.

  • When choosing to use the delimited text format, you must specify the delimiter to place between attribute values. Common delimiters are a comma, the pipe character, or a semicolon.

  • The Host parameter supports hostname or IP address, including elastic IP address commonly used in cloud environments.

  • It is recommended that different feeds of event data use their own TCP (Client) output configurations and ports.

Parameters

The following are the parameters for the output:

Parameter

Description

Data type

Host

(Required)

The host name or the IP address of the TCP server to establish a socket connection. The default is localhost. The host value can also be 1.1.1.1 or example.com.

String

Port

(Required)

The TCP port number on which the server is listening to incoming connections—for example, 5005.

Integer

Connection Timeout

(Optional)

Specifies how long, in seconds, the client waits while trying to establish a connection to the TCP server. If the connection cannot be established in the specified amount of time, the output reports an error. The default is 60 seconds.

Integer

Output data format

(Required)

Specifies the data format type of your output. Options are GeoJSON, EsriJSON, Delimited, and JSON.

Output data format type

Considerations and limitations

Consider the following when using the output:

  • If you provide invalid information for the Host or Port parameter, Velocity throws an error because it cannot establish connection to the specified host name and port.

  • A TCP connection may be abruptly terminated by the TCP server when, for example, server resources have been depleted, or the server thinks that the client is no longer reachable because it has not responded to a control message. Once the client-server connection is closed, neither entity can communicate status with the other. This means an active TCP (Client) output may not be able to automatically reconnect. It is recommended that you manually stop and restart the Velocity output to restore connection to the TCP server in this case.