Inconsistent Group Protocol Exception - Why?

I have a Docker environment set up with Zookeeper, Kafka, four MySQL databases (configured for the Debezium MySQL connectors that I am able to register with Connect successfully). When I attempt to consume a topic from the client side I get this error:

[main] INFO org.apache.kafka.common.utils.AppInfoParser - Kafka version: 3.4.0
[main] INFO org.apache.kafka.common.utils.AppInfoParser - Kafka commitId: 2e1947d240607d53
[main] INFO org.apache.kafka.common.utils.AppInfoParser - Kafka startTimeMs: 1690286589667
[main] INFO org.apache.kafka.clients.consumer.KafkaConsumer - [Consumer clientId=consumer-1-1, groupId=1] Subscribed to topic(s): master.provider_directory.providers
Waiting for message in KafkaConsumer.poll
[main] INFO org.apache.kafka.clients.Metadata - [Consumer clientId=consumer-1-1, groupId=1] Resetting the last seen epoch of partition master.provider_directory.providers-0 to 0 since the associated topicId changed from null to egUqtzS5RCC2v4IP_idJuA
[main] INFO org.apache.kafka.clients.Metadata - [Consumer clientId=consumer-1-1, groupId=1] Cluster ID: hXpcGUBeSCy1tzkixgfR5Q
[main] INFO org.apache.kafka.clients.consumer.internals.ConsumerCoordinator - [Consumer clientId=consumer-1-1, groupId=1] Discovered group coordinator 172.22.0.7:9092 (id: 2147483646 rack: null)
[main] INFO org.apache.kafka.clients.consumer.internals.ConsumerCoordinator - [Consumer clientId=consumer-1-1, groupId=1] (Re-)joining group
[main] ERROR org.apache.kafka.clients.consumer.internals.ConsumerCoordinator - [Consumer clientId=consumer-1-1, groupId=1] JoinGroup failed due to fatal error: The group member's supported protocols are incompatible with those of existing members or first group member tried to join with empty protocol type or empty protocol list.
[main] INFO org.apache.kafka.clients.consumer.internals.ConsumerCoordinator - [Consumer clientId=consumer-1-1, groupId=1] Request joining group due to: rebalance failed due to 'The group member's supported protocols are incompatible with those of existing members or first group member tried to join with empty protocol type or empty protocol list.' (InconsistentGroupProtocolException)
[main] INFO org.apache.kafka.clients.consumer.internals.ConsumerCoordinator - [Consumer clientId=consumer-1-1, groupId=1] Resetting generation and member id due to: consumer pro-actively leaving the group
[main] INFO org.apache.kafka.clients.consumer.internals.ConsumerCoordinator - [Consumer clientId=consumer-1-1, groupId=1] Request joining group due to: consumer pro-actively leaving the group
[main] INFO org.apache.kafka.common.metrics.Metrics - Metrics scheduler closed
[main] INFO org.apache.kafka.common.metrics.Metrics - Closing reporter org.apache.kafka.common.metrics.JmxReporter
[main] INFO org.apache.kafka.common.metrics.Metrics - Metrics reporters closed
[main] INFO org.apache.kafka.common.utils.AppInfoParser - App info kafka.consumer for consumer-1-1 unregistered
Exception in thread "main" org.apache.kafka.common.errors.**InconsistentGroupProtocolException: The group member's supported protocols are incompatible with those of existing members or first group member tried to join with empty protocol type or empty protocol list.**

I don’t see any difference in the config dump of the client from those of the connectors and in particular the one with the topic I’m trying to consume. All are configured with:

partition.assignment.strategy = [class org.apache.kafka.clients.consumer.RangeAssignor, class org.apache.kafka.clients.consumer.CooperativeStickyAssignor]

So I’m not sure what’s inconsistent where. Any help urgently accepted.

The answer ended up being to ensure the consumer group.id is not accidentally (or intentionally) the same as the group.id of the producers. Nothing in the documentation here, and I didn’t find the solution, this guy did: java - org.apache.kafka.common.errors.InconsistentGroupProtocolException: The group member's supported protocols are incompatible with those of existing - Stack Overflow

It was the documentation sent me looking in all kinds of wrong directions before I stumbled on that stackoverflow solution!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.