编程知识 cdmana.com

Why is the mqtt message forcibly disconnected from the platform when it exceeds 256 bytes at a time?

The phenomenon and background of the problem

I use STM32+ESP8266wifi Send... To Alibaba cloud Internet of things mqtt message , I use cJSON Library Group payload The content of , When there are too many attribute fields, it is found that once it is sent to Alibaba cloud, Alibaba cloud cannot receive , Take a look at Alibaba cloud's logs , already offlin( Get offline ) Client disconnected ( Alicloud error code 1910), After I eliminated the memory problem , I found the whole Alibaba cloud mqtt message ( Including fixed headers + Residual length + Variable length ) exceed 256 Bytes , Send it to Alibaba cloud mqtt I will disconnect from alicloud .256 The message of byte size can be released normally and the subsequent connection will not be disconnected , The length exceeds 256 One byte is disconnected .
I found

Operation results and error reporting contents

img

My solution ideas and tried methods

mqtt The official document says the length of support is 256MB Of

img


The largest number of messages supported by Alibaba cloud official documents is 256KB
And I just sent it 257B The message is not good , Now I can't find the reason

What I want to achieve

版权声明
本文为[CSDN Q & A]所创,转载请带上原文链接,感谢
https://cdmana.com/2021/12/20211207200639053t.html

Scroll to Top