When using ChirpStack (before loraserverio), in the MQTT subscription, the text 'rx' is obsolete since version 3.11.0 (11/18/2020), has been replaced by '/event/up', which is what ChirpStack is currently publishing. As a consequence, if (splittedMqttTopic.length !== 5) also had to be changed from 5 to 6, since otherwise it gives a 'Bad format for a LoRaServer.io topic'.
When using ChirpStack (before loraserverio), in the MQTT subscription, the text 'rx' is obsolete since version 3.11.0 (11/18/2020), has been replaced by '/event/up', which is what ChirpStack is currently publishing. As a consequence, if (splittedMqttTopic.length !== 5) also had to be changed from 5 to 6, since otherwise it gives a 'Bad format for a LoRaServer.io topic'.
Reference: https://www.chirpstack.io/application-server/integrations/mqtt/