I am having trouble in MQTT communication. I am new to MQTT and IOT. I am using IBM Bluemix as a cloud service. I can publish the data using node-red MQTT node on the device type. But I am not able to subscribe to that device and topic. Whenever I try to subscribe, it gets disconnected. Thanks
In this picture, I am publishing the status event to the device
In this picture, I am getting the published data in the cloud
However, as shown below, when i try to subscribe, it gets disconnected
PS: I am using the same client ID. I don't know how to use a different client ID for the same device type.
When you publish, you are publishing as a device and connecting with the device client ID. A device can not subscribe to a status event, so you should be subscribing as an application. It will connect with an ID such as A:orgId:appId https://console.ng.bluemix.net/docs/services/IoT/applications/mqtt.html#mqtt