【问题标题】:Kafka mqtt-connector over TLS基于 TLS 的 Kafka mqtt-connector
【发布时间】:2020-11-26 11:40:28
【问题描述】:

我需要帮助,因为我是 kafka 和 mqtt 的新手。 我正在使用 docker compose 为 Mosquitto 代理和 Kakfa 之间的通信创建架构

我也在使用 confluent Kafka Connect MQTT (https://www.confluent.io/hub/confluentinc/kafka-connect-mqtt) 提供的连接器

它适用于通过端口 1883 进行通信 但是当我尝试通过端口 8883 使用 MQTT 连接时,它失败了,因为它找不到任何证书。

有人知道如何配置 Kafka Connect MQTT 吗?需要什么样的证书(*.crt 不起作用)?

提前致谢, 卢卡

【问题讨论】:

    标签: apache-kafka docker-compose mqtt


    【解决方案1】:

    这个问题有点老了,但由于我最近遇到了同样的问题,我把解决方案放在这里以防将来对某人有所帮助:

    您必须使用keytool 创建一个 TrustStore 文件并将您的证书放入其中:

    keytool -import -file C:\cascerts\CA.cert -alias CA -keystore myTrustStore
    

    系统将提示您为 TrustStore 设置密码。

    然后在 MQTT 连接器属性文件中放入 SSL 配置:

    # SSL
    mqtt.ssl.trust.store.path=myTrustStore
    mqtt.ssl.trust.store.password=password
    mqtt.ssl.key.store.path=myTrustStore
    mqtt.ssl.key.store.password=password
    

    【讨论】:

      猜你喜欢
      • 2016-07-02
      • 2020-05-23
      • 1970-01-01
      • 1970-01-01
      • 2021-03-20
      • 1970-01-01
      • 2022-08-15
      • 2020-08-03
      • 1970-01-01
      相关资源
      最近更新 更多