Asynchronous Mode The number of messages to send in one batch when using async mode.
Asynchronous Mode The number of messages to send in one batch when using async mode. The producer will wait until either this number of messages are ready to send or bufferMaxMs timeout is reached.
Dump current props for debugging
messageSendMaxRetries This property will cause the producer to automatically retry a failed send request.
messageSendMaxRetries This property will cause the producer to automatically retry a failed send request. This property specifies the number of retries when such failures occur. Note that setting a non-zero value here can lead to duplicates in the case of network errors that cause a message to be sent but the acknowledgment to be lost.
No Compression Allows you to turn off the compression codec for all data generated by this producer.
requestRequiredAcks 0) which means that the producer never waits for an acknowledgment from the broker (the same behavior as 0.7).
requestRequiredAcks 0) which means that the producer never waits for an acknowledgment from the broker (the same behavior as 0.7). This option provides the lowest latency but the weakest durability guarantees (some data will be lost when a server fails). 1) which means that the producer gets an acknowledgment after the leader replica has received the data. This option provides better durability as the client waits until the server acknowledges the request as successful (only messages that were written to the now-dead leader but not yet replicated will be lost). -1) which means that the producer gets an acknowledgment after all in-sync replicas have received the data. This option provides the best durability, we guarantee that no messages will be lost as long as at least one in sync replica remains.
Set any additional properties as needed
Generate the Kafka ProducerConfig object
Use Snappy Compression instead of the default compression