Linking components to an MQTT & OPC tag

So, I'm trying to test out how it might be possible to link a component to an OPC tag and an MQTT tag.

This test is based on a system for fail over. In short there are some remote sites that will be polled for their data. Pump runtimes, status, faults etc. The primary means of communication will be MQTT.

Now if this primary communication method fails then the backup method to obtain information will be OPC.

I'm having trouble tying this into my project as currently I have all my components on screen linked via OPC.

What I'm trying to do is have a component, let's say a pushbutton for example take its data via MQTT so long as that communication method is active. Then if MQTT comms were to fail, start reading its data via OPC. I'm just having trouble putting this all together in the designer on my components.

Would the best route be creating a custom property on the component based on the state of MQTT? Then if it were to fail have another custom property linked to OPC?

There might be a better way to do this, but we've done something similar with user provided input into a page. In our case, we either had "live tag data" linked to a OPC Memory Tag of an Order Number. But if the person using the page wanted to run a one off Order Number (think quality engineer checking an order) without impacting the Floor's screen and updating the OPC tag, it will run locally instead.

What we did was have bound properties; one pointing at the OPC tag, one pointing at the URL Parameter. Then we had a "selected order" property that depending on the condition (ours was checking a view param from the URL), it will choose which bound parameter to use. Then everything on the page was bound to the selected order set. I would imagine you can set it up the same way, which is what you appeared to be getting to at the end of your post.