ehumber commented on code in PR #7283:
URL: https://github.com/apache/kafka/pull/7283#discussion_r850798257


##########
clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java:
##########
@@ -1053,6 +1048,14 @@ private ClusterAndWaitTime waitOnMetadata(String topic, 
Integer partition, long
         return new ClusterAndWaitTime(cluster, elapsed);
     }
 
+    private TimeoutException timeoutForAbsentMetadata(String topic, Integer 
partition, long maxWaitMs, Integer partitionsCount) {
+        return new TimeoutException(partitionsCount == null ?
+                String.format("Topic %s not present in metadata after %d ms.",
+                        topic, maxWaitMs) :
+                String.format("Partition %d of topic %s with partition count 
%d is not present in metadata after %d ms.",
+                        partition, topic, partitionsCount, maxWaitMs));

Review Comment:
   +1 this comment.  It would be really useful to have a cause that indicates 
the reason for this TimeoutException, without having to check the error message.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to