You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/01/09 01:11:15 UTC

[GitHub] [flink] becketqin commented on a change in pull request #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …

becketqin commented on a change in pull request #10794: [FLINK-15490][kafka][test-stability] Enable idempotence producing in …
URL: https://github.com/apache/flink/pull/10794#discussion_r364519578
 
 

 ##########
 File path: flink-connectors/flink-connector-kafka-base/src/test/java/org/apache/flink/streaming/connectors/kafka/testutils/DataGenerators.java
 ##########
 @@ -104,6 +104,8 @@ public void cancel() {
 		if (secureProps != null) {
 			props.putAll(testServer.getSecureProperties());
 		}
+		// Ensure the producer enables idempotence.
+		props.putAll(testServer.getIdempotentProducerConfig());
 
 Review comment:
   Yes, you are right. The idempotence will be enabled if `transactional.id` is set. But our KafkaITCase is using AT_LEAST_ONCE semantic without enabling checkpoint, so by default a non-transactional producer will be instantiated, which will remove the `transactional.id` config. 
   https://github.com/apache/flink/blob/bd56224c3063fd23d508a4250e5698d4840fa488/flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducer.java#L1155
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services