我们有卡夫卡下面的设置
Partition - 10
Replication - 3
fetch.max.byte at broker - 32MB
Producer
max.block.ms =- 5min
request.timeout.mm - 5min
retries - 4
Consumer
No custom config
Message size - 1kb通过这种设置,我们将面临以下问题:
主题1是topic2的生产者,因此根据我们的分析,主题发布是可以的,但是来自topic1的消费有延迟。我们认为这是因为经纪人。
发布于 2019-02-16 16:57:04
如果您看到超出了linger.ms时间的异常,这意味着该批消息在发送缓冲区中的时间超过了linger.ms。您可以将linger.ms设置为零,让生产者立即向代理发送消息。
根据您的描述,延迟发生在生产方面。除了将linger.ms设置为零之外,调整下列设置可能有助于减少产生延迟:
acks= 1 # Leader will write the record to its local log but will
# respond without awaiting full acknowledgement from all followers.
batch.size # reduce the batch size so that the producer do not wait for
# a larger batch size
delivery.timeout.ms # this is available since Kafka 2.1, and allows you
# specify clearly on delivery timeout
max.in.flight.requests.per.connection # increase # of inflight request can
# help to improve throughputhttps://stackoverflow.com/questions/54724408
复制相似问题