Hi All,
I am developing a product base on QCA4010 which will receive a signal from IR module and send it to a Broker over MQTT protocol.
I have done with developing MQTT client to publish/subscribe message but I could not publish a message with payload length more than 400.
When I try to send a packet with size is 512 or 1024 the MQTT library return error -5 which is (PUBLISH_ERROR).
So, There is anyway to help me to get the MQTT client able to publish message with size more than 400.
Thanks,
Cong Nga Le
Hi ,
The maximum payload length of MQTT publish is 512 . It also includes Topic and thing name.
Regards
Jyotiranjan
Hi jbhanu,
Thank for your information. I have managed to only publish/subcribe message with payload length under 480 bytes then it is worked.
But, I face another problem which is the MQTT client disconnected and throw SOCKET_CLOSE error message if I receive round 8 - 10 messages.
I guess it is an issue in socket layer about buffering, do I have any way to verify and fix this problem?
Thanks,
Cong Nga Le
Ok. What is the size of each messages?
Regards
Jyotiranjan
Hi jbhanu,
I usually send 2 packet a time, with 452 bytes for first packet and 258 bytes for second packet. I have send multiple time which is around 8 to 10 times, in total I have sent 16 - 20 packets then the issue happens.
Thanks,
Cong Nga Le
Can you please try to reproduce the same with mosquitto broker locally and share me the steps.