mas-chen commented on code in PR #70:
URL:
https://github.com/apache/flink-connector-kafka/pull/70#discussion_r1556263478
##########
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:
Do we want to decrement after the callback is completed? What's the best
approach semantically?
--
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]