Luke Chen created KAFKA-20799:
---------------------------------
Summary: Introduce new error for consumer/share group name
collision
Key: KAFKA-20799
URL: https://issues.apache.org/jira/browse/KAFKA-20799
Project: Kafka
Issue Type: Improvement
Affects Versions: 4.4.0
Reporter: Luke Chen
When shared group and classic consumer group has name collision, the error is
not clear to users.
Scenarios:
*1. Existing classic consumer group: "test_group"*
1.1. When creating a new shared group named "test_group", the clients will get
this exception:
{code:java}
org.apache.kafka.common.errors.GroupIdNotFoundException: Group test_group is
not a share group.{code}
1.2. When altering the offset for a classic consumer group named "test_group",
the clients will get this exception:
{code:java}
> bin/kafka-consumer-groups.sh --bootstrap-server localhost:9092 --group
> test_group --reset-offsets --topic quickstart-events --to-offset 0 --execute
org.apache.kafka.common.errors.GroupIdNotFoundException: Failed altering group
offsets for the following partitions: [quickstart-events-0]{code}
*2. Existing share group: "test_share_group"*
2.1. When creating a new classic consumer group via joinGroup request, clients
will get:
{code:java}
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.{code}
2.2. When altering the offset for a shared group named "test_share_group", the
clients will get this exception:
{code:java}
> ./bin/kafka-share-groups.sh --bootstrap-server localhost:9092 --group
> test_share_group --reset-offsets --topic quickstart-events --to-offset 0
> --execute
org.apache.kafka.common.errors.GroupIdNotFoundException: Group bbb is not a
share group. Failed altering group offsets for the following partitions:
[quickstart-events-0]{code}
*Issues:*
# Inconsistent errors for classic consumer group handling:
GroupIdNotFoundException VS InconsistentGroupProtocolException
# Either it's GroupIdNotFoundException or InconsistentGroupProtocolException,
it is not clear to users that the group id creation failure is because the
group id is actually taken by another type of group, not "group id not found"
or "inconsistent group protocol" error. Maybe a new "GroupIdInUseException" is
better?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)