tweise commented on code in PR #70:
URL: 
https://github.com/apache/flink-connector-kafka/pull/70#discussion_r1665918661


##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/sink/FlinkKafkaInternalProducer.java:
##########
@@ -396,8 +408,27 @@ public String toString() {
                 + transactionalId
                 + "', inTransaction="
                 + inTransaction
+                + ", pendingRecords="
+                + pendingRecords.get()
                 + ", closed="
                 + closed
                 + '}';
     }
+
+    public class TrackingCallback implements Callback {
+
+        private final Callback actualCallback;
+
+        public TrackingCallback(final Callback actualCallback) {
+            this.actualCallback = actualCallback;
+        }
+
+        @Override
+        public void onCompletion(final RecordMetadata recordMetadata, final 
Exception e) {
+            pendingRecords.decrementAndGet();

Review Comment:
   Since it already happened, we should probably decrement as soon as possible?



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to