Kafka
KafkaSinkConnector: From EventMesh to Kafka
- Start your EventMesh Runtime.
- Enable sinkConnector and check
sink-config.yml
. - Start your KafkaConnectServer, which will subscribe to the topic defined in
pubSubConfig.subject
in the EventMesh Runtime, The received data is published toconnectorConfig.topic
in Kafka. - Using the Topic specified in
pubSubConfig.subject
, send a message to EventMesh, which you will then see in Kafka.
# Common configuration
pubSubConfig:
meshAddress: 127.0.0.1:10000
subject: TopicTest
idc: FT
env: PRD
group: kafkaSink
appId: 5031
userName: kafkaSinkUser
passWord: kafkaPassWord
connectorConfig:
connectorName: kafkaSink
# kafka connection parameters ↓
bootstrapServers: 127.0.0.1:9092
topic: TopicTest
keyConverter: org.apache.kafka.common.serialization.StringSerializer
valueConverter: org.apache.kafka.common.serialization.StringSerializer
KafkaSourceConnector: From Kafka to EventMesh
- Start your EventMesh Runtime.
- Enable sourceConnector and check
source-config.yml
. - Start your KafkaConnectServer, which will subscribe to Kafka's
connectorConfig.topic
and send the read data topubSubConfig.subject
in the EventMesh Runtime. - Send a message to Kafka, and you'll receive it in EventMesh.
# Common configuration
pubSubConfig:
meshAddress: 127.0.0.1:10000
subject: TopicTest
idc: FT
env: PRD
group: kafkaSource
appId: 5032
userName: kafkaSourceUser
passWord: kafkaPassWord
connectorConfig:
connectorName: kafkaSource
# kafka connection parameters ↓
bootstrapServers: 127.0.0.1:9092
topic: TopicTest
groupID: kafkaSource
sessionTimeoutMS: 10000
maxPollRecords: 1000