Skip to content

Latest commit

 

History

History
109 lines (75 loc) · 1.68 KB

File metadata and controls

109 lines (75 loc) · 1.68 KB

Socket

Socket source connector

Description

Used to read data from Socket.

Key features

Options

name type required default value
host String Yes
port Integer Yes
common-options no -

host [string]

socket server host

port [integer]

socket server port

common options

Source plugin common parameters, please refer to Source Common Options for details

Example

simple:

Socket {
        host = "localhost"
        port = 9999
    }

test:

  • Configuring the SeaTunnel config file
env {
  execution.parallelism = 1
  job.mode = "STREAMING"
}

source {
    Socket {
        host = "localhost"
        port = 9999
    }
}

transform {
}

sink {
  Console {}
}
  • Start a port listening
nc -l 9999
  • Start a SeaTunnel task

  • Socket Source send test data

~ nc -l 9999
test
hello
flink
spark
  • Console Sink print data
[test]
[hello]
[flink]
[spark]

Changelog

2.2.0-beta 2022-09-26

  • Add Socket Source Connector

Next Version

  • host and port become required (3317)