Producer Application Utilizing Multiple Threads

2023-04-24 Thread Arvid Sundbom
Hi! I have a question about executing a Kafka producer application, utilizing multiple threads. In the documentation for Kafka producers ( https://kafka.apache.org/23/javadoc/index.html?org/apache/kafka/clients/producer/KafkaProducer.html) it says that "...sharing a single producer instance across

RE: Producer Application Utilizing Multiple Threads

2023-04-24 Thread Margaret Figura
Hi Arvid, Just as another user of Kafka, I suspect the claim has to do with the producer's ability to perform batching and compression across produced data, so it should be more efficient in some cases, especially with smaller volumes of data and larger linger.ms settings. However, like you, I

Re: Producer Application Utilizing Multiple Threads

2023-04-24 Thread Santhosh Kumar
Hi Arvind Yes, there is data to support the claim that sharing a single producer instance across threads in Apache Kafka is generally faster than having multiple instances. The reason for this is that a single producer instance can take advantage of batch processing, which allows it to send multi