arduino-libraries / ArduinoMqttClient

ArduinoMqttClient Library for Arduino
GNU Lesser General Public License v2.1
192 stars 75 forks source link

Connection lost message size > 256 #20

Closed sebb898 closed 4 years ago

sebb898 commented 5 years ago

Hi i have tried to mod the Arduino example "AWS_IoT_GSM" to be able to get longer message size on MQTT with following code below:

void publishMessage(String input) {
  Serial.println("Publishing message");

    bool retained = false;
    int qos = 0; // Have tested with both 0 and 1 
    bool dup = false;

  mqttClient.beginMessage("arduino/outgoing",input.length(),retained,qos,dup);
  mqttClient.print(input);
  mqttClient.endMessage();
}

I can send one or two message then i lose connection. But it works fine if i just use "mqttClient.beginMessage("arduino/outgoing");"

sandeepmistry commented 4 years ago

Hi @sebb898,

Could you please provide a full sketch and more detailed steps to reproduce this issue. In particular it's not clear what input contains. Thank you.

aentinger commented 4 years ago

Hi @sebb898 :wave: I'm closing this since there was no feedback from you since 11/11/2019. Please reopen if this is still relevant providing the information requested in https://github.com/arduino-libraries/ArduinoMqttClient/issues/20#issuecomment-552634652 .