becketqin commented on a change in pull request #12589:
URL: https://github.com/apache/flink/pull/12589#discussion_r438671644
##########
File path:
flink-connectors/flink-connector-kafka-0.11/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducer011.java
##########
@@ -675,7 +676,7 @@ public void close() throws FlinkKafka011Exception {
break;
case AT_LEAST_ONCE:
case NONE:
-
currentTransaction.producer.close();
+
currentTransaction.producer.close(0, TimeUnit.SECONDS);
Review comment:
Technically speaking, we should only close the producer with timeout
zero when it is a exactly once producer.
A more consistent approach might be always call flush first, then close the
producer with 0 timeout. That should work for both exactly-once and
at-least-once cases.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]