[英]Increase the throughput of kafka
I am reading data from a CSV file and pushing that into 3 Kafka brokers using Java code.我正在从 CSV 文件中读取数据并使用 Java 代码将其推送到 3 个 Kafka 代理中。
But, I am getting only 5 message/sec as throughput, while my expectation is about 200 message/sec但是,我只得到 5 条消息/秒的吞吐量,而我的期望是大约 200 条消息/秒
I am using asynchronous mode for pushing the data我正在使用异步模式来推送数据
below is my producers.properties下面是我的 producer.properties
buffer.memory: 100000000
batch.size: "3276800"
linger.ms: "5"
compression.type: lz4
retries: default
send.buffer.bytes: 10458760
connections.max.idle.ms: 10000
Any help would be deeply appreciated.任何帮助将不胜感激。
thanks.谢谢。
Why write code to do this?为什么要编写代码来做到这一点? Just use Kafka Connect (which is part of Apache Kafka) and https://github.com/jcustenborder/kafka-connect-spooldir which includes support for CSV files.只需使用 Kafka Connect(它是 Apache Kafka 的一部分)和https://github.com/jcustenborder/kafka-connect-spooldir ,其中包括对 CSV 文件的支持。 Chances are this is going to perform better, and it's easier to maintain, to deploy, etc.有可能这会表现得更好,并且更容易维护、部署等。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.