Hi,
I am using MQTTClient-C library. I am assuming the payload to be null-character delimited. I guess I should be using payloadLength to delimit the payload.
Pratheek
Hi,
not sure which embedded client library you are using, MQTTPacket, MQTTClient or MQTTClient-C, but you are assuming that the message data is length delimited, not by null-character, aren't you?
Ian
On 28/11/2017 20:39, Pratheek Rai wrote:
Hello,
I am using Eclipse Paho Embedded C in synchronous mode and I subscribe for only 1 topic. I try to publish message for the subscribed topic form my Java client ( also using Eclipse Paho). I am facing the following issue.
1) I publish message "Hello" from the Java client.
2) I receive "Hello" message. No problems here.
3) I publish "123" from Java client.
4) I receive "123lo" on the Embedded C client.
If I clear the read buffer every time I receive a message then this issue is not observed. Do I have to do anything special in the callback method other than reading the payload data from MessageData* data?
Thank you.
Regards,
Pratheek Rai
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev
--
Ian Craggs
icraggs@xxxxxxxxxx IBM United Kingdom
Paho Project Lead; Committer on Mosquitto