TCP (Client)
The TCP (Client) feed type in ArcGIS Velocity receives events from a TCP server formatted as XML, JSON, or delimited text through a TCP socket connection.
Example
The following is an example use case for the feed:
A transportation agency uses a TCP (Client) feed in a real-time analytic to receive live vehicle data from a TCP server. The TCP server sends JSON messages with location and speed updates. The TCP Client (feed) listens to the TCP server, retrieves sample messages, and automatically detects the schema. Alerts are triggered when the vehicle exceeds a speed of 80 mph. These alerts help the agency monitor the traffic and quickly respond to incidents.
Usage notes
Keep the following in mind when working with the feed:
The TCP (Client) feed makes a connection to the TCP server to receive the data. You must ensure that the TCP server is listening before you configure the TCP (Client) feed.
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.
In addition to attribute delimitation, each data record must also have a delimiter. The TCP (Client) feed needs to know where one data record ends and another begins.
Parameters
The following are the parameters for the feed:
|
Parameter |
Description |
Data type |
|---|---|---|
|
Host |
The host name or the IP address required to initiate the connection with the TCP server—for example, localhost or 127.0.0.1. |
String |
|
Port |
The port required to initiate connection with the TCP server. |
Integer |
Consideration and limitation
Consider the following when using the feed:
The TCP (Client) feed connects to the TCP server to sample the data schema. The client disconnects while the feed configuration is being completed. When the feed is started, a new client connection is initiated.
Velocity connects, disconnects, and reconnects to the TCP server multiple times during feed configuration, before the feed is finally started to begin receiving data. Some server sockets may not anticipate this behavior. If the TCP server cannot support multiple client connections while Velocity tests its ability to connect to the server and/or connects to sample the server’s data schema, you may need to define the data schema manually.