arduino-mqtt icon indicating copy to clipboard operation
arduino-mqtt copied to clipboard

Skip Large Messages

Open 256dpi opened this issue 5 years ago • 3 comments

If a client receives a message that is bigger than its receive buffer if will crash and return the error "LWMQTT_BUFFER_TOO_SHORT". For this library the better approach would be to just skip and log large messages.

256dpi avatar Apr 29 '20 08:04 256dpi

can we add the size for this buffer?

maglevize avatar Sep 25 '20 10:09 maglevize

Hello, i had the same issue. Did you modified the behavior? Can we catch the error?

Sisco21 avatar Feb 11 '21 14:02 Sisco21

@256dpi

Hello, Nice feature to have - on large payloads device loses the connection to MQTT broker, so we have to protect it from this kind of possible attack.

mrdc avatar Sep 20 '21 17:09 mrdc

We should expose lwmqtt_drop_overflow to skip too large messages.

256dpi avatar Feb 04 '23 10:02 256dpi

Added in eae214b1c2ca0d861037617a0ed0128e3c5ec306.

256dpi avatar Feb 05 '23 14:02 256dpi