emqx / CocoaMQTT

MQTT 5.0 client library for iOS and macOS written in Swift
https://www.emqx.com/en
Other
1.6k stars 419 forks source link

Unable to accept message sizes above 1MB in Websockets mode #536

Open xiuzhenguo opened 1 year ago

xiuzhenguo commented 1 year ago

Max Packet Size Set to 10MB;

TCP mode can receive message content of over 1MB; However, the Websockets mode cannot accept content above 1MB, and the error message is message too long

截屏2023-07-27 14 36 00 截屏2023-07-27 14 37 00 截屏2023-07-27 14 45 23

leeway1208 commented 1 year ago

Maybe the backend or broker is the reason of the limitation. Because I tested the demo broker which runs well.

xiuzhenguo commented 1 year ago

With the same configuration, I can receive and send messages exceeding 1MB using TCP and SSL modes; However, using ws and wss modes cannot receive messages larger than 1MB; I think if it's a problem with the backend and broker, it should be that all modes cannot accept messages above 1MB; Or could you provide the configuration of the backend and broker, I will use your configuration for testing