Looking for a relay switch function

If you feed your control messages to flow variables, then you can read the value of those flow values in a switch node and route you messages as required

image