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

查看:968
本文介绍了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.

推荐答案

max.poll.records:是,来自新使用者,默认情况下此属性更改为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天全站免登陆