Hi,
I have a TCP in node set to receive data from various sensor controllers, and sends this data to a backend via mqtt, while optionally send a response based on several conditions. This system has to handle multiple simultaneous connections on the same port. When the response is triggered by the input, this works fine and the response is sent to the correct connection on the port.
However, there are also cases where the response is initiated based on an mqtt message from the backend.
A simplified diagram of the situation is like below:

The backend sends messages in response to the data, thus the connection will still be open.
However, how do I ensure that this message gets sent to the correct connection if there are multiple connections? Is there a way to track the connections and ensure it gets sent to a specific connection? Or is there a better way of achieving the same setup that I am not aware of?
Thanks for any advice.