The TCPClient transport handler allows the delivery of results over TCP/IP to an arbitrary host. This transport handler can be used in both directions, connecting to a server to receive data and connect to a server to publish data.
host: The host/IP of the target
port: The port of the target system
read: The size of the read buffer (optional)
write: The size of the write buffer (optional)
input = ACCESS({source='Source', wrapper='GenericPush', transport='TCPClient', protocol='CSV', dataHandler='Tuple', options=[['host', 'example.com'],['port', '8080'],['read', '10240'],['write', '10240']], schema=[ ['id', 'Double'], ['data', 'String']] }) output = SENDER({sink='Sink', wrapper='GenericPush', transport='TCPClient', protocol='CSV', dataHandler='Tuple', options=[['host', 'example.com'],['port', '8081'],['read', '10240'],['write', '10240']] }, input) |
CREATE STREAM source (id Double, data STRING) WRAPPER 'GenericPush' PROTOCOL 'CSV' TRANSPORT 'TCPClient' DATAHANDLER 'Tuple' OPTIONS ( 'host' 'example.com', 'port' '8080', 'read' '10240', 'write' '10240') CREATE SINK sink (id Double, data STRING) WRAPPER 'GenericPush' PROTOCOL 'CSV' TRANSPORT 'TCPClient' DATAHANDLER 'Tuple' OPTIONS ( 'host' 'example.com', 'port' '8080', 'read' '10240', 'write' '10240') |