I am unable to send messages over a certain limit. I have looked at the docs and have already tried to redefine the max packet size:
#define MQTT_MAX_PACKET_SIZE 512
I've even tried increasing the limit to ridiculous limits and still the message is ignored. The size of my message is 253 characters in compressed JSON format:
{ "code_gc": [ 38000,1,69,342,171,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,63,21,21,21,21,21,21,21,63,21,63,21,63,21,63,21,63,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,63,21,63,21,63,21,1829,342,85,21,3663 ] }
It's an IR remote for anyone wondering what I'm building.
Does anyone have any ideas on what I should do to allow this message through? My only thought now is to scrap MQTT and create a REST server, which I don't want to do as MQTT is a lot faster in my experience..
As I was advised by the repository owner of PubSubClient
, I needed to change the MQTT_MAX_PACKET_SIZE
inside the source file of PubSubClient
as it cannot be redefined.
This fixed my issue.