Unable to make an MQTT pub-sub connection

203 Views Asked by At

I have been trying to make a simple MQTT pub sub communication on my device using node-red. I have published and subscribed to the topic: telemetry. the server and port used are : mqtt.bosch-iot-hub.com:8883 . For the TLS configuration, the iot hub certificate provided by bosch is being used(https://docs.bosch-iot-hub.com/cert/iothub.crt). I am able to successfully publish the data on the topic and receive it using a HONO receiver. But when I directly subscribe to that topic using node-red mqtt-in node or mosquitto_sub, it doesn't receive the data.

Can someone please help me understand why is it happening and what could be the possible solution to it?

1

There are 1 best solutions below

0
On

There is no point in devices subscribing to the telemetry topic. In Hono (and thus the Bosch IoT Hub) devices only publish telemetry data and/or events. Such data is consumed by downstream applications using Hono's north bound, AMQP 1.0 based Telemetry and Event APIs. Applications can use Hono's AMQP 1.0 based Command & Control API to send commands to (connected) devices. In order to receive commands, MQTT based devices need to subscribe to the command topic.