confluentinc / confluent-kafka-dotnet

Confluent's Apache Kafka .NET client
https://github.com/confluentinc/confluent-kafka-dotnet/wiki
Apache License 2.0
60 stars 862 forks source link

Failed to fetch committed offsets for partitions in #2240

Open yeyijin opened 3 months ago

yeyijin commented 3 months ago

Description

I use new topic and group. The topic has 10 partitions , but no message. The first consumer starts normally and is ready to consume as soon as there is news. 10 minutes later, the second consumer starts, but prompts

Confluent.Kafka.ConsumeException: Failed to fetch committed offsets for partitions in group "my_group": Local: Broker transport failure at Confluent.Kafka.Consumer2.Consume(Int32 millisecondsTimeout) at Confluent.Kafka.Consumer2.Consume(CancellationToken cancellationToken)

Thanks. How to reproduce

Checklist

Please provide the following information:

yeyijin commented 3 months ago
 var consumerConfig = new ConsumerConfig
 {
     BootstrapServers = host,
     AutoOffsetReset = AutoOffsetReset.Latest,//消费最新
     GroupId = group,
     EnableAutoOffsetStore = true,
     EnableAutoCommit = true,

 };

while (!stoppingToken.IsCancellationRequested)
{
    try
    {
        var msg = _consumer.Consume(stoppingToken);
   }
  catch (Exception ex)
  {
  }
}
anchitj commented 2 months ago

Can you provide debug logs?

yeyijin commented 2 months ago

ERROR|rdkafka#consumer-4| [thrd:app]: rdkafka#consumer-4: xxx.BootstrapServers.com:9092/bootstrap: Disconnected (after 5802ms in state UP) CLUSTERID|rdkafka#consumer-4| [thrd:main]: Broker GroupCoordinator/203 reports different ClusterId "856HD-OddfsfsdddItOQ" than previously known "HuNdfsdfsdf6Etszzfd3PA": a client must not be simultaneously connected to multiple clusters FAIL|rdkafka#consumer-4| [thrd:GroupCoordinator]: GroupCoordinator: 172.1.1.12:19092: Disconnected (after 6212ms in state UP) ERROR|rdkafka#consumer-4| [thrd:app]: rdkafka#consumer-4: GroupCoordinator: 172.1.1.12:19092: Disconnected (after 6212ms in state UP)

yeyijin commented 2 months ago

Can you provide debug logs?

hello. I have provided logs.What should be noted if two consumers from different topics are connected to two clusters