conduktor.io ↗

KIP-799 — Align behaviour for producer callbacks with documented behaviour

Discussion Kafka 3.2 Producer

Fixes an inconsistency in `KafkaProducer` callback behavior where `Callback.onCompletion` passes a non-null placeholder `RecordMetadata` in some error paths but null in others, contrary to the Javadoc contract specifying that exactly one of `metadata` or `exception` is null. The inconsistency was introduced in PR #4188 (KAFKA-6180) and can cause NPEs or incorrect error handling in callback implementations.

Details

AuthorSeamus O Ceanainn
StatusDiscussion
Kafka Version3.2
JIRAKAFKA-13448
WikiView on Apache Wiki
Created2021-11-11
Last Modified2021-12-03
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.