Page 1 of 1

Simple MQTT client test/example

Posted: Tue Apr 26, 2016 8:11 am
by bairdmar
I'm trying to learn to use MQTT with I've downloaded a few clients and done lots of googling but I''ve not had lots of success.
I've created a very simple stream on with one field/data item. I'm trying to use the eclipse paho MQTT utility to publish data to that stream and I'm striking out. I am able to connect to the server (, using a generic username, and the public key from my data stream as password), but as soon as I try to publish data it disconnects and nothing is published. For what its worth, I don't really care what the MQTT client is so if there is another suggestion thats great too. I'd really appreciate any advice.
Thank you.

Re: Simple MQTT client test/example

Posted: Fri Apr 29, 2016 10:52 am
by pconroy
I'm sorry in that while I've done a lot of MQTT, I haven't started anything with data.sparkfun yet. I could only offer shot-in-the-dark debug suggestions. I don't know if data.sparkfun needs creds/certs, but it sounds like it does. In my experience, cert/TLS problems wouldn't let me connect. Since you are connecting, it sounds like something else.

The one MQTT parameter that bit me once was "Keep Alive". Make sure it's a nice high value until you understand the timing of your client.

Standing up a local broker is trivial (I've used mosquitto ( How about trying that? Convince yourself that it's not the client code? Get it working locally?

Sorry - not much help.
When I'm done messing w/ AWS, I'll start in on data.sparkfun (or Azure).