btlqql opened a new pull request, #10625: URL: https://github.com/apache/rocketmq/pull/10625
## Problem A consumer group can accidentally consume a topic, but the current administration API only removes all offsets with the subscription group. Operators cannot clean up one group-topic relationship without affecting the group's progress on unrelated topics. Closes #10114. ## Root cause Consumer offsets are keyed by topic and group internally, but the broker protocol and mqadmin surface expose only group-wide removal. The precise storage operation was not wired through the broker, client, admin API, and CLI layers. ## Changes - add a dedicated request code and ACL-aware request header for deleting one group-topic offset - remove the exact key from normal, server-side reset, and pull offset tables, while using the existing persistent offset deletion path - add broker-side blank resource validation and an idempotent success response - expose the operation through MQClientAPIImpl, MQAdminExt, and DefaultMQAdminExt - add the mqadmin deleteConsumerOffset command with required group/topic arguments and a mutually exclusive broker-or-cluster target - handle a null broker response explicitly instead of relying on Java assertions - cover exact-key isolation, broker validation/delegation, client success/failure/null responses, CLI parsing, and broker/cluster execution ## Impact This adds an opt-in administration operation and does not change normal offset commits. It deletes only the selected topic@group offset and leaves the consumer group's offsets for other topics intact. Running consumers can commit the offset again, so operators should stop the affected consumer before cleanup when persistent removal is required. ## Validation - mvn -pl broker,client,tools -am -DskipTests -Dspotbugs.skip=true compile - mvn -pl broker,client,tools -am -DskipTests -Dspotbugs.skip=true test-compile - ConsumerOffsetManagerTest#removeOffsetByGroupAndTopicTest - AdminBrokerProcessorTest#testDeleteConsumerOffset and #testDeleteConsumerOffsetRejectsBlankResource - MQClientAPIImplTest#testDeleteConsumerOffset, #testDeleteConsumerOffsetFail, and #testDeleteConsumerOffsetNullResponse - DeleteConsumerOffsetCommandTest (8 tests, including direct broker and cluster execution) - git diff --check ## Prior work #10115 previously explored the same issue but was closed without merge. This PR reimplements the feature on current develop and adds explicit target validation, null-response handling, isolation checks, and broker/cluster command coverage. -- 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]
