Reputation: 401
enable.idempotence=true
librdkafka version is 1.6.0
Our external Kafka readers expect messages without any gaps or duplicates
When producing with librdkafka C++ API below 3 type of errors can be detected,
When any of these errors occur what is the recommended error handling procedure ?
Terminate ?
OR
Is it correct to [All the steps from 1 to 4 are part of the suggested solution]
Upvotes: 0
Views: 616
Reputation: 165
librdkafka handles the error based on it's severity.
non-permanent errors will be handled internally by retrying the failed messages.
for permanent errors like broker down, message delivery failures (on dr_msg_cb) you need to call rd_kafka_poll() regularly to retry the failed messages.
Source :
https://github.com/confluentinc/librdkafka/blob/master/INTRODUCTION.md#message-reliability
https://github.com/confluentinc/librdkafka/wiki/Error-handling
Upvotes: 1