How to subscribe the published message in microcontroller using mqtt?

Successfully i have written MQTT protocol code for Microcontroller using gprs. I can able to publish the data in the topic “platform”,after that i am trying to subscribing to the same topic to get the data, but i could not receive anymore data.
I have set the clean session flag to false, retain flag to false ,Qos for (publishing-0,subscribing-1). Help me in solving this problem.
void main()
{
while(1)
{
publish_data(“platform”,”pradeep”);
subscribe_data(“platform”,1);
wait(1)
}
}


Source: c#

Leave a Reply