I’m working on a project where I need to publish MQTT messages with higher reliability than the default QoS 0. I’ve noticed that DefaultMQTTHandler hardcodes the QoS to AT_MOST_ONCE.
My goal is to create a new handler (or modify the existing one) that can dynamically send messages with QoS 1 or QoS 2, depending on the message type or topic.
What is the recommended approach to achieve this in OpenRemote? Is there a guide or an example I can follow?
I think that a reasonable way to start doing this would be to implement your own MQTT handler. By doing so, you essentially can define the logic of how messages are replied to and at what QoS level. If you want to do this for other, built in MQTT handlers, then you are goin to have to handle the modifications to the current MQTT handlers yourself. Here’s an example from my Fleet Telematics repository: fleet-management/manager/src/main/java/telematics/teltonika/TeltonikaMQTTHandler.java at main · openremote/fleet-management · GitHub