I am trying to subscribe to a mqtt topic with kafka connect, for this I used this connector: https://github.com/johanvandevenne/kafka-connect-mqtt . I followed the steps described there with a little modification and everything seemed to work. However, when I start the connector I get a ClassNotFoundException (screenshot) and the connector stops. It seems like it's coming from IMqttMessageListener but I don't know how to solve this.
Any ideas on what I can do?
This is my source file:
connector.class : be.jovacon.kafka.connect.MQTTSourceConnector
mqtt.broker : tcp://localhost:1883
mqtt.clientID: 1
mqtt.topic : test
kafka.topic: timestamp
key.converter:org.apache.kafka.connect.storage.StringConverter
key.converter.schemas.enable:false
value.converter:org.apache.kafka.connect.storage.StringConverter
value.converter.schemas.enable:false
You need to copy /target/kafka-connect-mqtt-1.0-0-package/share/kafka-connect-mqtt
to your plugin.path
where you can be found as a configuration in worker's configuration file .
Once you copy the JAR to your plugin.path
, make sure to restart Kafka Connect .
For more details about how to install Connect plugins, refer to Confluent's Documentation .
You need to copy all the 6 jars in the directory /kafka-connect-mqtt/target/kafka-connect-mqtt-1.1.0-package/kafka-connect-mqtt/. Your path is probably different from the one mentioned in the readme file for the repo that you are following.
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.