You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/05/17 01:37:49 UTC

[GitHub] [kafka] guozhangwang commented on a change in pull request #10675: KAFKA-12574: remove internal Producer config and auto downgrade logic

guozhangwang commented on a change in pull request #10675:
URL: https://github.com/apache/kafka/pull/10675#discussion_r633174817



##########
File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsProducer.java
##########
@@ -237,13 +237,15 @@ private static boolean isRecoverable(final KafkaException uncaughtException) {
      * @throws TaskMigratedException
      */
     protected void commitTransaction(final Map<TopicPartition, OffsetAndMetadata> offsets,
-                           final ConsumerGroupMetadata consumerGroupMetadata) {
+                                     final ConsumerGroupMetadata consumerGroupMetadata) {
         if (!eosEnabled()) {
             throw new IllegalStateException(formatException("Exactly-once is not enabled"));
         }
         maybeBeginTransaction();
         try {
-            producer.sendOffsetsToTransaction(offsets, consumerGroupMetadata);
+            // Older brokers don't understand any group metadata beyond the group id, thus we must downgrade the request for eos-v1

Review comment:
       nit: maybe clarify a bit better here, e.g. "EXACTLY_ONCE_V2 on the Streams config assumes that broker is at least 2.5 and hence understand ... ; if it is smaller than V2, then the brokers may be on older versions and hence ..."




-- 
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