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
| Author | Seamus O Ceanainn |
| Status | Discussion |
| Kafka Version | 3.2 |
| JIRA | KAFKA-13448 |
| Wiki | View on Apache Wiki |
| Created | 2021-11-11 |
| Last Modified | 2021-12-03 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.