We are using Kafka-Mqtt connector from Confluent team. Is there any way to publish data from multiple Mqtt topics to multiple Kafka topics with same name as of Mqtt , ie test1 in Mqtt -> test1 in kafka so on. ?
You can run multiple MQTT Source connectors in order to replicate data from distinct topics:
For example,
{
"config" : {
"name" : "MqttSourceConnector1",
"connector.class" : "io.confluent.connect.mqtt.MqttSourceConnector",
"tasks.max" : "1",
"mqtt.server.uri" : "< Required Configuration >",
"mqtt.topics" : "topic_1"
}
}
and,
{
"config" : {
"name" : "MqttSourceConnector2",
"connector.class" : "io.confluent.connect.mqtt.MqttSourceConnector",
"tasks.max" : "1",
"mqtt.server.uri" : "< Required Configuration >",
"mqtt.topics" : "topic_2"
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.