Reputation: 7592
I am using kafka as a messaging platform. I need to send a whole bunch of messages to it. I was searching for a bulk api that can take a list of Records, but could not find it in kafka-clients artifact.
Is there a bulk producer api for Kafka in Java?
Upvotes: 1
Views: 3975
Reputation: 6562
You are the one deciding what signifies a record so splitting up the data into messages has to be done on your side. The Kafka producer supports batching of several messages into fewer sends.
For something more like a bulk loader, there is a recent initiative of something along those lines with the Copycat framework. Some of this is in trunk but it's currently a work in progress.
Upvotes: 7