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
2.3.0 2022-12-30â
host
andport
become required (3317)