Sending multiple jsons in one producer call

Hi Team
We have a requirement to publish 4million records(regular data migration once in 2months) to confluent Kafka queue. if we send one by one json to producer it is taking 100k per hour. for four million records it would take a month or more.
Is there a way we can send bulk json messages(say 500 jsons) in One request.
Please let me know the sample if available.

any suggestions are appreciated.


The Kafka producer defaults to buffer data in memory before sending. See buffer.size and configs.

How about you split your data apart into 40 or more different processes, so it only takes about an hour?