@talhatec
However, when a sensor calls back to the controller, both HomeAssistant and myController send out replies, and due to this, i think the messages clash, and the controllers endup sending it multiple times.
I do not know your preference about, which controller wants to response for your sensors request. Suppose you want MyController only on listen mode, you have to change MQTT Topic publish to some dummy topic on MyController gateway settings.