hhktseng commented on code in PR #70:
URL:
https://github.com/apache/flink-connector-kafka/pull/70#discussion_r1670902618
##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/sink/FlinkKafkaInternalProducer.java:
##########
@@ -72,12 +74,17 @@ private static Properties withTransactionalId(
return props;
}
+ public long getPendingRecordsCount() {
+ return pendingRecords.get();
+ }
+
@Override
public Future<RecordMetadata> send(ProducerRecord<K, V> record, Callback
callback) {
if (inTransaction) {
hasRecordsInTransaction = true;
}
- return super.send(record, callback);
+ pendingRecords.incrementAndGet();
+ return super.send(record, new TrackingCallback(callback));
Review Comment:
just want to check, are we proposing putting instance of TrackingCallback
into the rotating cache? wouldn't that caused the previous callback that might
not have been invoked to be ignored?
--
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]