简体   繁体   English

异步 Kafka Producer 批量大小 a linger.ms

[英]Asynchronous Kafka Producer batch size a linger.ms

I have a question about optimizing kafka asynchronous producer Throughput: the configuration batch.size and linger.ms have an effect when using asynchronous producer?我有一个关于优化kafka异步生产者吞吐量的问题:配置batch.size和linger.ms在使用异步生产者时有影响吗?

I am asking because I think that those parameters will only impact synchronous producer because it will wait for broker acknowledgment.In case of asynchronous producer, this will not have impact?我问是因为我认为这些参数只会影响同步生产者,因为它将等待代理确认。如果是异步生产者,这不会有影响吗?

Also, is there any configuration parameter that can optimize asynchronous producer?另外,有没有可以优化异步生产者的配置参数?

Both the properties have impact on asynchronous Kafka Producer:这两个属性都对异步 Kafka Producer 有影响:

linger.ms-> This instruct the producer upto this configured value(ex:2 millisecond) if batch size is not fill up. There will be latency of 2 ms in case message flow is low.



batch.size -> Message buffer size that will be send in single request. Higher batch size also request more memory (buffer.memory)

acks=all , Slowest but most durable configuration, wait for acknowledgement of all message sent.

For details, You can go through Kafka document: https://kafka.apache.org/23/javadoc/org/apache/kafka/clients/producer/KafkaProducer.html具体可以go通过Kafka文档: https://kafka.apache.org/23/javadoc/org/apache/kafka/clients/producer/KafkaProducer.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Spring Kafka 生产者不能异步工作 - Spring Kafka producer not work asynchronous Kafka 生产者因 myTopic-1:120004 的 2 条记录过期而失败,自批量创建以来已过去 - Kafka producer fails with expiring 2 record(s) for myTopic-1:120004 ms has passed since batch creation Kafka Producer 错误:使用 timeoutMillis = 9223372036854775807 ms 关闭 Kafka 生产者 - Kafka Producer error: Closing the Kafka producer with timeoutMillis = 9223372036854775807 ms xxxxx 的 1 条记录过期:自批次创建以来已过去 30030 毫秒加上延迟时间 - Expiring 1 record(s) for xxxxx: 30030 ms has passed since batch creation plus linger time Spring 用于 Apache Kafka:无法识别的生产者配置 - 'delivery.timeout.ms' - Spring for Apache Kafka: Unrecognized producer configuration - 'delivery.timeout.ms' MapR Streams Kafka API 的批量大小问题 - Batch Size Problem with MapR Streams Kafka API Kafka Consumer 是否默认批量大小? - Does a Kafka Consumer default batch size? Kafka 事务生产者抛出“在 60000 毫秒内初始化事务 state 时超时已过期” - Kafka transactional producer throws 'Timeout expired while initializing transactional state in 60000ms' Kafka Java Producer和kerberos - Kafka Java Producer with kerberos 生产者连接池-Kafka - Producer Connection Pool - Kafka
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM