Page 1 of 1

Netburner MQTT PAHO Library - publish size limit

Posted: Mon Jun 13, 2022 3:59 am
by ecasey
I am trying to add MQTT to an existing app on a MOD5282 using version 2.86. I can get it to work but the publish size is limited to 72 characters. Any more characters and it returns -1. I can't find anything in the code that would set an upper limit explicitly.

Does anyone have any suggestions to overcome this limit?

Re: Netburner MQTT PAHO Library - publish size limit

Posted: Tue Jun 14, 2022 3:42 pm
by ecasey
I figured it out. There is a parameter at line 111 of MQTTClient.h with a default set:

Code: Select all

int MAX_MQTT_PACKET_SIZE = 100
When I changed the default to 1000, it published my 450 byte message. There doesn't seem to be a more elegant way of changing that parameter.
Hope this helps someone.

Re: Netburner MQTT PAHO Library - publish size limit

Posted: Thu Jun 16, 2022 8:32 am
by TomNB
Thank you for posting the follow up. I'm sure it will.