MQTT subscribe retrieves no data back after immediate reply

4 views (last 30 days)
Dear Sirs,
I am student in university, new in MQTT, used MQTTlens and MQTT.fx as the client.
Used them to subscribe the public channel "1293177", the channel publish weather data frequently.
But, only got the first record immediately after subscribe, and no more.
If subscribe again, will got the same record again.
I follow the article at and without mismatch.
Would you kindly help to figure out the problem is?
Jason Wu
Jason Wu on 26 May 2021
One, only one client at the same time. The purpose is to experience about the subscribe effect. Unfortunately, it not work.

Sign in to comment.

Answers (1)

Vinod on 27 May 2021
I just tested the workflow with MQTT.fx and it works fine. Some points to remember:
1) When setting up the connection, set the "Password" to the "MQTT API Key" from your ThingSpeak profile page
2) When subscribing to a channel, the topic must be: channels/<CHANNEL_ID>/subscribe/json/<CHANNEL_READ_API_KEY>
3) Now publish "field1=45" to this channel using this topic: channels/<CHANNEL_ID>/publish/<CHANNEL_WRITE_API_KEY>
For every publish at 15s or slower (with a free license) you should also see that a subscribe message is received.
Vinod on 29 May 2021
Can you share screenshots of the mqttfx application with your settings. Clearly some misconfiguration as it works perfectly fine for me.

Sign in to comment.


More Answers in the  ThingSpeak Community




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!