Skip to content

Conversation

pragatiguptaaa
Copy link
Member

Description

Context:
Following Kafka's KIP-1043, describing a non-existent consumer group now consistently throws GroupIdNotFoundException.

In this approach, we are catching GroupIdNotFoundException and immediately re-throw it, propagating the specific " group id not found" signal to the caller. This preserves information and gives callers flexibility but requires them to implement their own handling logic for this exception.
Another approach: #10711

Testing done

Describe the testing strategy. Unit and integration tests are expected for any behavior changes.

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")
  • Do these changes have compatibility implications for rollback? If so, ensure that the ksql command version is bumped.

@Copilot Copilot AI review requested due to automatic review settings April 1, 2025 10:06
@pragatiguptaaa pragatiguptaaa requested a review from a team as a code owner April 1, 2025 10:06
@confluent-cla-assistant
Copy link

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR propagates the original GroupIdNotFoundException to clearly signal when a consumer group does not exist, in-line with Kafka's KIP-1043.

  • Restores and uncomments the shouldDescribeConsumerGroup test in the integration tests.
  • Introduces a try-catch block in the test to handle GroupIdNotFoundException as a signal for a group with 0 consumers.
  • Updates the service implementation to explicitly catch and re-throw GroupIdNotFoundException.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
ksqldb-engine/src/test/java/io/confluent/ksql/integration/KafkaConsumerGroupClientTest.java Uncomments a test and adds exception handling for a missing consumer group in the test scenario.
ksqldb-engine/src/main/java/io/confluent/ksql/services/KafkaConsumerGroupClientImpl.java Adds a catch block to re-throw GroupIdNotFoundException for clear exception propagation.
Comments suppressed due to low confidence (1)

ksqldb-engine/src/test/java/io/confluent/ksql/integration/KafkaConsumerGroupClientTest.java:143

  • Consider adding a dedicated test case that explicitly verifies the behavior when a consumer group does not exist, ensuring that the logged message and the returned zero counts are as expected.
}catch(final GroupIdNotFoundException exception){

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant