开发者社区> 问答> 正文

HA + MQ 模式下, 主从切换后, CanalMQStarter未启动对应的 destinati

版本1.1.2。 看代码, CanalMQStarter 在服务拉起时启动相应的线程来处理当前服务上已经运行的 instance 获取的 event, 如果服务拉起时, 所有的instance 都是备份 , 就不会有相应的canalMQWork 启动。

当主服务挂掉, 备份服务的instance 开启, 但没启动对应的 canalMQWork 把拉取 binlog 投送到消息服务。

原提问者GitHub用户ihanyong

展开
收起
古拉古拉 2023-05-08 17:05:24 105 0
1 条回答
写回答
取消 提交回答
  • ......

    final ClientIdentity clientIdentity = new ClientIdentity(destination.getCanalDestination(), (short) 1001, ""); while (running && destinationRunning.get()) { try { if (!canalServer.getCanalInstances().containsKey(clientIdentity.getDestination())) { try { Thread.sleep(3000); } catch (InterruptedException e) { // ignore } continue; } ......

    原回答者GitHub用户rewerma

    2023-05-09 18:36:52
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
RocketMQ Client-GO 介绍 立即下载
RocketMQ Prometheus Exporter 打造定制化 DevOps 平台 立即下载
基于 RocketMQ Prometheus Exporter 打造定制化 DevOps 平台 立即下载