Netburner MQTT PAHO Library - publish size limit

Discussion to talk about software related topics only.
Post Reply
ecasey
Posts: 164
Joined: Sat Mar 26, 2011 9:34 pm

Netburner MQTT PAHO Library - publish size limit

Post 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?
ecasey
Posts: 164
Joined: Sat Mar 26, 2011 9:34 pm

Re: Netburner MQTT PAHO Library - publish size limit

Post 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.
User avatar
TomNB
Posts: 576
Joined: Tue May 10, 2016 8:22 am

Re: Netburner MQTT PAHO Library - publish size limit

Post by TomNB »

Thank you for posting the follow up. I'm sure it will.
Post Reply