I inititally thought the problem is in MQTT itself
Though after thorough testing, I found that level-sublevel's readStream sends 'end' event prematurely. It sends it after the last item is read, rather than the last read(1) === null. This causes a bunch of problems (see below)
https://github.com/mqttjs/MQTT.js/issues/1319
I inititally thought the problem is in MQTT itself
Though after thorough testing, I found that level-sublevel's readStream sends 'end' event prematurely. It sends it after the last item is read, rather than the last
read(1) === null
. This causes a bunch of problems (see below) https://github.com/mqttjs/MQTT.js/issues/1319