kafka-connect-iot-mqtt-connector-example icon indicating copy to clipboard operation
kafka-connect-iot-mqtt-connector-example copied to clipboard

Connector configuration is invalid and contains the following 1 error(s): MqttException (0)

Open vmsh1 opened this issue 1 year ago • 0 comments
trafficstars

Unable to create Kafka MQTT Connector with the following configuration.

Connector Config:

{
    "name": "mqtt-source",
    "config": {
        "connector.class": "io.confluent.connect.mqtt.MqttSourceConnector",
        "tasks.max": 1,
        "mqtt.server.uri": "tcp://192.168.10.17:1883",
        "mqtt.topics": "shellies/shellyswitch2/info",
        "kafka.topic": "mqtt-ha-events-topic",
        "confluent.topic.bootstrap.servers": "10.0.0.42:9092,10.0.0.43:9092,10.0.0.44:9092",
        "confluent.topic.replication.factor": 1,
        "mqtt.username": "**",
        "mqtt.password": "***"
    }
}

Result:

curl -d @mqtt.json -H "Content-Type: application/json" -X POST http://192.168.10.45:8083/connectors | jq

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   770  100   236  100   534   8278  18732 --:--:-- --:--:-- --:--:-- 27500
{
  "error_code": 400,
  "message": "Connector configuration is invalid and contains the following 1 error(s):\nMqttException (0)\nYou can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`"
}
Pasted Graphic

vmsh1 avatar Jul 14 '24 23:07 vmsh1