Skip to content

Kafka Source

stream source

The source will query the Kafka periodically to get data stream.

Default build command

shell
# cd $eKuiper_src
# go build -trimpath --buildmode=plugin -o plugins/sources/kafka.so extensions/sources/kafka/kafka.go
# cp plugins/sources/kafka.so $eKuiper_install/plugins/sources

Restart the eKuiper server to activate the plugin.

Configuration

The configuration for this source is $ekuiper/etc/sources/kafka.yaml. The format is as below:

yaml
default:
  brokers: "127.0.0.1:9091,127.0.0.1:9092"
  groupID: ""
  partition: 0
  maxBytes: 1000000

You can check the connectivity of the corresponding sink endpoint in advance through the API: Connectivity Check

Properties

Property nameOptionalDescription
brokersfalseThe broker address list ,split with ","
saslAuthTypetrueThe Kafka sasl authType, support none,plain,scram, default none
saslUserNametrueThe sasl user name
passwordtrueThe sasl password
insecureSkipVerifytruewhether to ignore SSL verification
certificationPathtrueKafka client ssl verification Cert file path
privateKeyPathtrueKey file path for Kafka client SSL verification
rootCaPathtrueKafka client ssl verified CA certificate file path
certficationRawtrueKafka client ssl verified Cert base64 encoded original text, use certificationPath first if both defined
privateKeyRawtrueKafka client ssl verified Key base64 encoded original text, use privateKeyPath first if both defined
rootCARawtrueKafka client ssl verified CA base64 encoded original text, use rootCaPath first if both defined
maxBytestrueThe maximum number of bytes that a single Kafka message batch can carry, the default is 1MB
groupIDtrueThe group ID used by eKuiper when consuming kafka messages.
partitiontrueThe partition specified when eKuiper consumes kafka messages