AndrewJSchofield commented on code in PR #16872:
URL: https://github.com/apache/kafka/pull/16872#discussion_r1716433218


##########
clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerRecord.java:
##########
@@ -296,13 +223,23 @@ public Optional<Integer> leaderEpoch() {
         return leaderEpoch;
     }
 
+    /**
+     * Get the delivery count for the record if available
+     *
+     * @return the delivery count or empty when deliveries not counted

Review Comment:
   I would say they are not the same. `Optional.empty()` means deliveries are 
not being counted. `Optional.of(0)` would mean they are being counted and this 
is the zeroth delivery.
   
   If we were using Short instead, it would be the difference between `null` 
and `Short(0)`, that is, no value and a value of zero.



-- 
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