...
- In the one case where KafkaProducer is calling Callback.onCompletion directly, update the call to pass a placeholder value for metadata (in a manner consistent with the Javadoc) instead of a null value. The placeholder value would be as follows:
- TopicPartition: Topic would always be correct. Partition is either a valid partition value (if known) or '-1' otherwise.
All other fields (offestoffset, timestamp, serializedKeySize and serializedValueSize) would have a value of -1 explicitly set.
...