Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Problem with message arrived.

Hello,

the payload is a binary field delimited by length, not a null-terminated C string, unless you added the null terminator explicitly yourself.  That's the first thing I would check.

Ian

On 12/12/2017 13:11, Vamsinag Gunti wrote:

Hello,

I am using Eclipse Paho C in synchronous mode where I subscribe to only one topic. When I publish a message for the corresponding topic, the message I receive is correct only on the first occurrence and is weird there after. This is the issue I am facing:

  1. I publish "1234" from C client
  2. I receive "1234" on C client. No problem on the first go.
  3. I publish "1234"
  4. I receive "1234Client.c"
  5. I publish "hello"
  6. I receive "hellolient.c"
  7. I publish "1234"
  8. I receive "1234Client.c"

I do not see any overlap of messages but the message arrived seems to be concatenated with some file's name. Am I supposed to clear some buffer every-time I receive a message?

Thanks in advance


Best Regards,
Vamsi


_______________________________________________
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

Back to the top