MQTT Borker switch in flexy 205

Hi All,
I am using Flexy 205 send data to sever via MQTT borker by VPN turnel ,
Is any sample code for switch mqtt broker when the connection from flexy to broker down, will switch to primary mqtt broker
thank for your support

We have a test site here with a basic example you can run.