Kafka 一些异常报错、注意事项(1)

本文记录了Kafka使用中遇到的三个常见问题:消费者poll超时、magic v1不支持record headers异常及分区策略。消费者poll超时可能是由于max_poll_records设置过大导致的;kafka写入异常是因为0.10版本不支持headers,需要升级到0.11以上版本;此外,介绍了Kafka如何通过分区策略在多个broker间分布数据。
摘要由CSDN通过智能技术生成

记录一:This member will leave the group because consumer poll timeout has expired.

[| test_kafka_group] o.a.k.c.c.internals.AbstractCoordinator : [Consumer clientId=consumer-2, groupId=test_kafka_group] This member will leave the group because consumer poll timeout has expired. This means the time between subsequent calls to poll() was longer than the configured max.poll.interval.ms, which typically implies that the poll loop is spending too much time processing messages. You can address this either by increasing max.poll.interval.ms or by reducing the maximum size of batches returned in poll() with max.poll.records.

原因:对kafka的max_poll_records 设置过大,处理不过来。

记录二:kafka写入异常 magic v1 does not supprt record headers

原因:0.10的kafka服务端是不支持header的,用高版本的kafka客户端0.11不报错。用了skywalking,不能用kafka的0.11以下版本,需要升级。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值