MQTT Subscriber on IBM Watson

Solved
jsayed's picture
jsayed
Junior(0)

Hi Peter/all,

I was able to compile and run the bluemix_iot example (MQTT Publisher) on my BCM4343W.
Now I like to implement MQTT Subscriber on my second device, also a BCM4343W for Watson.

Couple of questions on it:

a. Is there a snippet of a MQTT Subcriber for Watson, I could look at. I could not find one.
   I do see there is one for aws_iot, I could possibly use this as an example.

b. My 2nd questions is little confusion about how a MQTT subscriber running on BCM4343W 
   behind a Wifi router(API) will receive a topic (message) from the MQTT broker? How does
   IBM Watson or AWS achieve this?

   I will appeciate any enloghtment on this.

  thanks

PeterF's picture
PeterF
Moderator(14)

WICED Studio SDK:
Refer to subscription examples under aws_iot

 

Zentri SDK:
Refer to the bluemix and mqtt_demo examples.

 

Detail on operation of MQTT lightweight protocol:  

http://www.hivemq.com/blog/how-to-get-started-with-mqtt

 

jsayed's picture
jsayed
Junior(0)

Thanks Peter,  this part from the "Detail.....MQTT lightweight protocol"  helped -

" Therefore each MQTT client has a permanently open TCP connection to the broker. If this connection is interrupted by any circumstances, the MQTT broker can buffer all messages and send them to the client when it is back online."