Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

方法updateClientBinlogFilenameAndPosition和updateGtidSet等方法一样,可以被按需重写 #145

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on May 23, 2024

  1. 方法updateClientBinlogFilenameAndPosition和updateGtidSet等方法一样,可以被按需重写

    方法updateClientBinlogFilenameAndPosition和updateGtidSet等方法一样,可以被按需重写。
    例如,重写该方法并添加对 binlogFileName 和 position 进行持久化。当服务宕机重启后可以从持久化中读取并继续。
    
    例如:
    ```
            BinaryLogClient client = new BinaryLogClient(binLogProperties.getHost(), binLogProperties.getPort(),
                    binLogProperties.getUsername(), binLogProperties.getPassword()) {
    
                @OverRide
                private void updateClientBinlogFilenameAndPosition(Event event) {
                    super.updateClientBinlogFilenameAndPosition(event);
                    // 将binlogFileName和position持久化记录,在服务宕机重启后读取并继续
                    // (略)
                }
            };
    ```
    xzxiaoshan authored May 23, 2024
    Configuration menu
    Copy the full SHA
    081903d View commit details
    Browse the repository at this point in the history