max.poll.records 如何影响消费者投票 [英] How does max.poll.records affect the consumer poll

查看:26
本文介绍了max.poll.records 如何影响消费者投票的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

max.poll.records 最近在 kafka 消费者配置中更改为 500,但我想知道这如何影响消费者投票.是否只是可以获取的最大记录数的上限,还是消费者等待获取 500 条记录.

max.poll.records has been recently changed to 500 in kafka consumer config, but I am wondering how does this affect the consumer poll. Is it just an upper bound of the maximum number of records that could be fetched or the consumer waits till it gets 500 records.

推荐答案

ma​​x.poll.records : Yes from new consumer 这个属性默认改为 500,这意味着消费者可以轮询最少 1 到每次轮询最多 500 条记录,这意味着消费者不会在分区没有足够数据时等待

max.poll.records : Yes from new consumer this property is changed to 500 by default which means consumer can poll minimum 1 to max 500 records for each poll, and which means consumer will not wait when partition did not have sufficient data

fetch.min.bytes :默认是1个字节,如果你增加这个配置,消费者会等待.

fetch.min.bytes : By default it is 1 byte, consumer will wait if you increase this configuration.

服务器应为获取请求返回的最小数据量.如果没有足够的数据可用,则请求将在回答请求之前等待积累足够多的数据.1 字节的默认设置意味着只要有一个字节的数据可用或获取请求超时等待数据到达就会响应获取请求.将此设置为大于 1 的值将导致服务器等待大量数据积累,这可以稍微提高服务器吞吐量,但会增加一些延迟.

The minimum amount of data the server should return for a fetch request. If insufficient data is available the request will wait for that much data to accumulate before answering the request. The default setting of 1 byte means that fetch requests are answered as soon as a single byte of data is available or the fetch request times out waiting for data to arrive. Setting this to something greater than 1 will cause the server to wait for larger amounts of data to accumulate which can improve server throughput a bit at the cost of some additional latency.

这篇关于max.poll.records 如何影响消费者投票的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆