chiradip commented on code in PR #2499: URL: https://github.com/apache/iggy/pull/2499#discussion_r2650081754
########## foreign/java/external-processors/iggy-connector-pinot/src/main/java/org/apache/iggy/connector/pinot/consumer/IggyPartitionGroupConsumer.java: ########## @@ -0,0 +1,295 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.iggy.connector.pinot.consumer; + +import org.apache.iggy.client.async.tcp.AsyncIggyTcpClient; +import org.apache.iggy.connector.pinot.config.IggyStreamConfig; +import org.apache.iggy.consumergroup.Consumer; +import org.apache.iggy.identifier.ConsumerId; +import org.apache.iggy.identifier.StreamId; +import org.apache.iggy.identifier.TopicId; +import org.apache.iggy.message.Message; +import org.apache.iggy.message.PolledMessages; +import org.apache.iggy.message.PollingStrategy; +import org.apache.pinot.spi.stream.MessageBatch; +import org.apache.pinot.spi.stream.PartitionGroupConsumer; +import org.apache.pinot.spi.stream.StreamPartitionMsgOffset; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; + +/** + * Partition-level consumer implementation for Iggy streams. + * Reads messages from a single Iggy partition using the AsyncIggyTcpClient. + * + * <p>This consumer manages: + * <ul> + * <li>TCP connection to Iggy server</li> + * <li>Consumer group membership</li> + * <li>Message polling with offset tracking</li> + * <li>Automatic offset commit for consumer group</li> + * </ul> + */ +public class IggyPartitionGroupConsumer implements PartitionGroupConsumer { + + private static final Logger log = LoggerFactory.getLogger(IggyPartitionGroupConsumer.class); + + private final String clientId; Review Comment: Fixed. Removed both unused fields: - Removed `clientId` field (was only used in logging, now passed directly to log statement) - Removed `consumerGroupJoined` field and the unused `joinConsumerGroup()` method - The connector uses single consumer mode with explicit offset control instead of consumer group mode -- 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]
