How do I configure a TCP/Text connector to run in 'client' mode ... so I can connect to a socket hosted by an external server?

3341
1
08-12-2015 11:37 AM
SharonMeier
New Contributor III

Follow up question -- trying to create a connector that receives text over TCP.   Can I specify a specific port on a server/system from which I want to get the data?   The server is streaming data out of a specified port.  I want to connect to Geoevent to that port.   I've set my connect to "Host (Client Mode)" and have entered an ip address, but not sure where to put the port number. 

0 Kudos
1 Reply
RJSunderman
Esri Regular Contributor

Hey Sharon –

Since the out-of-the-box ‘Receive Text from a TCP Socket’ input is configured to run in SERVER mode I would recommend you:

  • Navigate to the Site > GeoEvent > Connectors page in the GeoEvent Manager
  • Use the filter pull-down to show only the ‘Inbound’ connectors
  • Click to copy the existing ‘Receive Text from a TCP Socket’ connector
  • Edit the descriptive properties as illustrated … then save your customized copy of the input.

Unfortunately, you need to open, edit, save then re-open your copy of the input to work around a bug in the UI. Once you’ve made the descriptive edits above and saved, click to edit your customized copy of the input:

  • Toward the bottom of the input connector’s configuration, move both the ‘Host’ the ‘Mode’ properties from ‘Hidden Properties’ to ‘Advanced Properties’.
    • You can move these properties up the list of advanced properties to place them next to the ‘Server Port’ if that makes more sense to you.
  • Double click the ‘Mode’ property and change it to overwrite the default value with a preferred setting of  ‘Client’ and save the setting.
  • Save your customized copy of the input

Now when you create an instance of an input using this connector as a template you will see that it has been configured to run in CLIENT mode and has properties which should allow you to specify the server and the port you to which you want to connect … as a client.

Watch your CPU and other system resources. We had a bug at the 10.3 release, which I think was addressed at 10.3.1, in which configuring a TCP/Text inbound connector to run in CLIENT mode was misbehaving (polling the socket on the external server too frequently) and consuming all of the Server’s CPU resource.

Hope this information helps –

RJ

0 Kudos