使用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
相关产品推荐
相关产品推荐

