微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Maxwell MySQLToJSON 的 Kafka 生产者

程序名称:Maxwell

授权协议: Apache-2.0

操作系统: 跨平台

开发语言: Java

Maxwell 介绍

Maxwell 是一个读取 MysqL binlogs 并将修改行字段的更新写入 Kafka, Kinesis, RabbitMQ, Google
Cloud Pub/Sub 或 Redis (Pub/Sub or LPUSH) 以作为 JSON 的应用程序。

Maxwell 拥有可对底层进行操作的操作栏(operational
bar),可生成一致、易于获取的更新流,你可以轻松“固定”流处理系统的一些优点,而无需通过整个代码库来添加(不可靠)检测点。

  • 常见用例包括 ETL、缓存构建/到期、指标收集、搜索索引和服务间通信。

  • 可在表的初始加载过程中执行 SELECT * from table (bootstrapping)

  • 支持在 master promotion 上的自动位置恢复

  • 为 Kakfa 提供灵活的分区方案 —— 按数据库、表、主键或字段进行

Maxwell 通过充当完整的 MysqL 副本来完成所有这些操作,包括用于 create/alter/drop 语句的 sql 解析器。

示例

  MysqL> insert into `test`.`maxwell` set id = 1, daemon = 'Stanislaw Lem';
  maxwell: {
    "database": "test",
    "table": "maxwell",
    "type": "insert",
    "ts": 1449786310,
    "xid": 940752,
    "commit": true,
    "data": { "id":1, "daemon": "Stanislaw Lem" }
  }


 MysqL> update test.maxwell set daemon = 'firebus!  firebus!' where id = 1;
  maxwell: {
    "database": "test",
    "table": "maxwell",
    "type": "update",
    "ts": 1449786341,
    "xid": 940786,
    "commit": true,
    "data": {"id":1, "daemon": "Firebus!  Firebus!"},
    "old":  {"daemon": "Stanislaw Lem"}
  }

Maxwell 官网

http://maxwells-daemon.io/

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐