mysql-binlog-connector-java
mysql-binlog-connector-java copied to clipboard
Failover to secondary DC
I'm reading the binary logs from a MySQL cluster that is distributed cross DC. My main datacenter (let's call it A) and my secondary datatacenter (let's call it B). In case of one DC fails I want to keep reading the binary logs from the other DC. I thought about creating a custom LifecycleListener implementation to handle that. Yet the hostname is not something you can change it's final. I was wondering if there's any different strategy I could use. So that when I have a communication failure after several retries on A I could change to B's hostname.
You need to implement a task allocation and monitoring scheduling framework. When there is an exception in the replication of the machine, the task allocation framework automatically senses and switches.