Details
-
Bug
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
2.3.0
-
None
-
Patch
Description
https://issues.apache.org/jira/browse/KAFKA-6833 changed the logic of the KafkaProducer.waitOnMetadata so that if a partition did not exist it would wait for it to exist.
It means that if called with an incorrect partition the method will eventually throw a TimeoutException, which covers both topic and partition non-existence cases.
However, the exception message was not changed for the case where metadata.awaitUpdate(version, remainingWaitMs) throws a TimeoutException.
This results in a confusing exception message. For example, if a producer tries to send to a non-existent partition of an existing topic the message is
"Topic %s not present in metadata after %d ms.", when timeout via the other code path would come with message
"Partition %d of topic %s with partition count %d is not present in metadata after %d ms."
Attachments
Issue Links
- links to