You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Micronaut MQTT通过证书认证向Azure IoT Hub发布消息失败

使用Micronaut MQTT通过证书认证向Azure IoT Hub发布消息失败

我正尝试用Micronaut MQTT连接Azure IoT Hub,目前手头有有效的客户端密钥、证书,以及IoT Hub的CA证书。

我在application.yml中配置了如下内容:

mqtt:
  client:
    server-uri: ssl://<iothub-name>.azure-devices.net:8883
    client-id: <device-id>
    user-name: <iothub-name>.azure-devices.net/<device-id>/?api-version=2021-04-12
    ssl:
      certificate:
        classpath:curl_est_crt.pem
      private-key:
        classpath:curl_est_key.pem
      certificate-authority:
        classpath:iothub.pem

不过当我尝试向IoT Hub发送消息时却失败了,抛出了以下异常:

io.micronaut.http.server.RouteExecutor - Unexpected error occurred: Error instantiating bean of type [io.micronaut.mqtt.v5.intercept....

备注:内容来源于stack exchange,提问作者Simon

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.16 07:38:02