Reputation: 7
I hava used the mosquitto as a mqtt client to connect to IBM Iot Foundation(quickstart.messaging.internetofthings.ibmcloud.com) and I can successfully send an event to the IotF. I start a terminal to publish the event:
mosquitto_pub -h 184.172.124.189 -p 1883 -u "use-token-auth" -P "token" -i d:quickstart:typeid:deviceid -t iot-2/evt/status/fmt/json -m " {\"d\": {\"temp\":34}}"
then I start another terminal to subscribe the event:
mosquitto_sub -h 184.172.124.189 -p 1883 -u "use-token-auth" -P "token" -i d:quickstart:type:id -t iot-2/type/typeid/id/deviceid/evt/status/fmt/json
but the terminal which subscribed event can't receive the event published by the other terminal.
Upvotes: 0
Views: 172
Reputation: 2626
I believe you are having this issue because you are authenticating as quickstart device to subscribe and receive the events. Try connecting as an application and subscribe to the event. See example in the docs.
Upvotes: 2