[SOLVED] Openhab2 mqtt 2.x doesn't clear the buffer

  • Platform information:
    • Hardware: raspberry 3B
    • OS: raspbian Stretch
    • Java Runtime Environment:
    • openHAB version: 2
  • Issue of the topic:

Hey Community,

i configured my mqtt Server on the Raspi and everything works fine (Communication with ESP8266 - programmed with Arduino ).
But when i first send a long Message like: “this is a text!” over MQTT to my ESP and then write a short message like:“Hello”, than openhab doesn’t clear the buffer and send: “Hellois a text!” .
Does anybody has the same issue?

Thanks

Please use mqtt.fx or similar to verify that it’s not your arduino program doing it wrong. openHAB is java based, and there is no such think as a buffer or old memory areas.

When we need a string we do new String().

ah, okay. thanks your right! my mistake.
i took malloc instead of calloc!