Hi Oleg,

There are a few configurations of kafka producer that are worth considering
in your case.:- ProducerConfig.RETRIES_CONFIG

it's java doc says "Setting a value greater than zero will cause the client
to resend any record whose send fails with a potentially transient error.
Note that this retry is no different than if the client resent the record
upon receiving the error. Allowing retries will potentially change the
ordering of records because if two records are sent to a single partition,
and the first fails and is retried but the second succeeds, then the second
record may appear first."

You can set retry off by setting this value to zero or less and handle send
failures and retries yourself in your code.

Regards,
Vinay Sharma

Reply via email to