Maxwell 配置

默认支持kafka的版本为1.0.0

MySQL端的支持传统复制和GTID复制(Maxwell 1.8版本+)

# cat config.properties |grep -v '#' |grep -v '^$'
producer=kafka
log_level=INFO
host=172.16.4.101
user=maxwell
password=maxwell
schema_database=maxwell-td
# replication 表示的是MySQL的数据库,maxwell的源库
replication_host=10.19.196.129
replication_user=maxwell
replication_password=maxwell
replication_port=3312
output_server_id=true
# kafka的相关配置
kafka.bootstrap.servers=kafka1.hadoop.xyz.com:9092,kafka2.hadoop.xyz.com:9092,kafka3.hadoop.xyz.com:9092
kafka_topic=maxwell_order_main
kafka.compression.type=snappy
kafka.retries=3
kafka.acks=-1
producer_partition_by=primary_key
kafka_partition_hash=murmur3
# 过滤的配置
filter= exclude: *.*,include: yjp_admin.city,include: /yjp_order_\\d+/.jiupiorder, include: /yjp_order_\\d+/.orderitem, include: /yjp_order_\\d+/.orderitemamount,include: /yjp_order_\\d+/.orderitemprice, include: /yjp_order_\\d+/.orderitemproduct, include: /yjp_order_\\d+/.orders, include: /yjp_order_\\d+/.orderproperty, include: /yjp_order_\\d+/.orderenvironment,include: /yjp_order_\\d+/.returnorder, include: /yjp_order_\\d+/.returnorderitem, include: /yjp_order_\\d+/.orderbatch,include: /yjp_bizuserwallet_\\d+/.couponcode,include: /yjp_productsku_\\d+/.productinfo, include: /yjp_productsku_\\d+/.productsku,include: /yjp_productsku_\\d+/.productinfospecification, include: /yjp_productsku_\\d+/.productinfodisplaycategory
# 监控
metrics_type=jmx,http
metrics_jvm=true
http_port=8091
http_diagnostic=true
client_id=pro-maxwell-td
replica_server_id=9000
# 提高吞吐性能
kafka.acks = 1
kafka.compression.type = snappy
kafka.retries=0
#  at-least-once delivery
kafka.acks = all
kafka.retries = 5 # or some larger number

参考:

http://maxwells-daemon.io/producers/#kafka

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值