Skip To Content

Receive Text from a TCP Socket

The Receive Text from a TCP Socket input connector can be used to adapt event data, formatted as delimited text, received through a TCP socket connection. The delimiter between attribute values is often a comma (,), so this type of data is sometimes referred to as comma-separated values. ArcGIS GeoEvent Server can use any ASCII printable character as a delimiter to separate data attribute values.

Delimited text being sent using GeoEvent Simulator.

Usage notes

Keep the following in mind when using the Receive Text from a TCP Socket input connector:

  • This input connector pairs the Text inbound adapter and the TCP inbound transport.
  • This connector can be used to receive delimited text from any TCP client able to see your server machine and that is connected to the specified TCP socket.
  • The connector is frequently used to receive simulated event data records from GeoEvent Simulator.
  • By default, the connector opens a TCP socket on port 5565, however, any available server port can be used.
  • Multiple Receive Text from a TCP Socket inputs can be configured, but each must specify a unique port.
  • Multiple TCP client applications can connect and send data to a single configured input simultaneously.
  • The Message Separator parameter is required. This single character specifies the end of an event record. A newline (\n) is a common end-of-record delimiter.
  • The Attribute Separator parameter is required. This single character separates one attribute value from another. A comma (,) is a common attribute delimiter.
  • GeoEvent Simulator interprets the end-of-file as an implicit event separator when the simulation file is loaded into memory. It is not necessary to end a simulation file with an empty line to force the inclusion of a message separator. Other TCP clients may behave differently.
  • The first attribute of a received delimited data string may be used to specify the name of a GeoEvent Definition. This is useful when datagrams with different attribute data types or numbers of data attributes are expected to be received; the data itself can help specify which GeoEvent Definition the adaptor should use to interpret the received data values. Use the Incoming Data Contains GeoEvent Definition parameter to leverage this capability. Typically, all data records received on a given socket will have the same schema, so this parameter should be set to No (the default).

Parameters

The following are the parameters for the Receive Text from a TCP Socket input connector:

ParameterDescription

Name

A descriptive name for the input connector used for reference in GeoEvent Manager.

Default Spatial Reference

The well-known ID (WKID) of a spatial reference to be used when a geometry is constructed from attribute field values whose coordinates are not latitude and longitude values for an assumed WGS84 geographic coordinate system, or when geometry strings are received that do not include a spatial reference. A well-known text (WKT) value or the name of an attribute field containing the WKID or WKT can also be specified.

Server Port

The server port that is used when establishing the TCP socket. TCP clients must be able to discover and connect to this port. The default port is 5565, but any available server port can be used.

Message Separator

A single literal character that indicates the end of an event data record. Unicode values can be used to specify a character delimiter. Do not enclose the character in quotes. A newline (\n) is a common end-of-record delimiter.

Attribute Separator

A single literal character used to separate one attribute value from another in a message. Unicode values can be used to specify a character delimiter. Do not enclose the character in quotes. A comma is a common attribute delimiter.

Expected Date Format

The pattern used to match expected string representations of date/time values and convert them to Java Date values. The pattern's format follows the Java SimpleDateFormat class convention.

While the preferred pattern for date/time values in GeoEvent Server is the ISO 8601 standard, several string representations of date/time values commonly recognized as date values can be converted to Java Date values without specifying an Expected Date Format value. These include the following:

  • "2019-12-31T23:59:59"—The ISO 8601 standard format
  • 1577836799000—Java Date (epoch long integer; UTC)
  • "Tue Dec 31 23:59:59 -0000 2019"—A common web services string format
  • "12/31/2019 11:59:59 PM"—A common format used in the United States (12-hour clock)
  • "12/31/2019 23:59:59"—A common format used in the United States (24-hour clock)

If the date/time values received use a convention other than one of those listed above, you must specify an expected date format pattern so GeoEvent Server can adapt the date/time values.

Incoming Data Contains GeoEvent Definition

Specifies whether the first attribute value of each delimited line of text is used as the name of a GeoEvent Definition. For more information, refer to the usage notes above.

  • Yes—The first attribute field in each event record is the name of a GeoEvent Definition (existing or new).
  • No—All the event records share a common schema and share one GeoEvent Definition. The first attribute field in each event record is sensor data, not the name of a GeoEvent Definition.

Create Unrecognized Event Definitions

(Conditional)

Specifies whether a new GeoEvent Definition is created when one with the specified name does not exist. When a delimited text file includes event records from different types of sensors, the first attribute value is used to specify the type of event, and this attribute value is used as the GeoEvent Definition name.

  • Yes—A new GeoEvent Definition is created if an event definition with the specified name does not already exist.
  • No—No new GeoEvent Definition is created. Inbound event data that does not have a corresponding GeoEvent Definition cannot be adapted and is not processed.

This parameter is shown when Incoming Data Contains GeoEvent Definition is set to Yes and is hidden when it's set to No.

Create GeoEvent Definition

(Conditional)

Specifies whether a new or an existing GeoEvent Definition is used for the inbound event data. A GeoEvent Definition is required for GeoEvent Server to interpret the inbound event data attribute fields and data types.

  • Yes—A new GeoEvent Definition is created based on the schema of the first event record received.
  • No—No GeoEvent Definition is created. Choose an existing GeoEvent Definition that matches the schema of the inbound event data.

This parameter is shown when Incoming Data Contains GeoEvent Definition is set to No and is hidden when it's set to Yes.

GeoEvent Definition Name (New)

(Conditional)

The name assigned to a new GeoEvent Definition. If a GeoEvent Definition with the specified name already exists, the existing GeoEvent Definition is used. The first data record received is used to determine the expected schema of subsequent data records, and a new GeoEvent Definition is created based on that first data record's schema.

This parameter is shown when Create GeoEvent Definition is set to Yes and is hidden when it's set to No.

GeoEvent Definition Name (Existing)

(Conditional)

The name of an existing GeoEvent Definition to use when adapting received data to create event data for processing by a GeoEvent Service.

This parameter is shown when Create GeoEvent Definition is set to No and is hidden when it's set to Yes.

Construct Geometry from Fields

Specifies whether the input connector will construct a point geometry using coordinate values received as attributes. The default is No.

  • Yes—Values from specified event attribute fields are used to construct a point geometry.
  • No—No point geometry is constructed. It is assumed that an attribute field contains a value that can be interpreted as a geometry or the event record is nonspatial (does not have a geometry).

X Geometry Field

(Conditional)

The attribute field in the inbound event data containing the x-coordinate part (for example, horizontal or longitude) of a point location.

This parameter is shown when Construct Geometry from Fields is set to Yes and is hidden when it's set to No.

Y Geometry Field

(Conditional)

The attribute field in the inbound event data containing the y-coordinate part (for example, vertical or latitude) of a point location.

This parameter is shown when Construct Geometry from Fields is set to Yes and is hidden when it's set to No.

Z Geometry Field

(Conditional)

The attribute field in the inbound event data containing the z-coordinate part (for example, depth or altitude) of a point location. If no value is provided, the z-value is omitted, and a 2D point geometry is constructed.

This parameter is shown when Construct Geometry from Fields is set to Yes and is hidden when it's set to No.

Language for Number Formatting

The locale identifier (ID) used for locale-sensitive behavior when formatting numbers from data values. The default is the locale of the machine GeoEvent Server is installed on. For more information, refer to Java Supported Locales.


In this topic
  1. Usage notes
  2. Parameters