bryanck commented on code in PR #17910:
URL: https://github.com/apache/iceberg/pull/17910#discussion_r4248941871


##########
kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/channel/Channel.java:
##########
@@ -55,24 +52,26 @@ abstract class Channel {
   private final SinkTaskContext context;
   private final Admin admin;
   private final Map<Integer, Long> controlTopicOffsets = Maps.newHashMap();
-  private final Map<Integer, Long> committedOffsets = Maps.newHashMap();
   private final String producerId;
+  private final Duration commitTimeout;
 
   Channel(
+      String name,
       String consumerGroupId,
-      String transactionalId,
       IcebergSinkConfig config,
       KafkaClientFactory clientFactory,
       SinkTaskContext context) {
     this.controlTopic = config.controlTopic();
     this.connectGroupId = config.connectGroupId();
     this.context = context;
 
+    String transactionalId = config.transactionalPrefix() + name + 
config.transactionalSuffix();
     this.producer = clientFactory.createProducer(transactionalId);
     this.consumer = clientFactory.createConsumer(consumerGroupId);
     this.admin = clientFactory.createAdmin();
 
     this.producerId = UUID.randomUUID().toString();
+    this.commitTimeout = Duration.ofMillis(config.commitTimeoutMs());

Review Comment:
   I don't feel we should reuse the commit timeout as a shutdown timeout, 
adjusting the commit timeout will then have side effects



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to