Skip to content

fix(consumer): normalize the group name in consumerGroupConfigurations - #7343

Open
123123213weqw wants to merge 1 commit into
apache:rocketmq-studiofrom
123123213weqw:fix/consumer-config-404
Open

123123213weqw wants to merge 1 commit into
apache:rocketmq-studiofrom
123123213weqw:fix/consumer-config-404

Conversation

@123123213weqw

Copy link
Copy Markdown
Contributor

Fixes #7283.

MetadataService.consumerGroupConfigurations filtered the provider results with the raw caller-supplied name while the provider search internally trims via normalizeFilter — so a padded name (" my-group ", which the rmq.group.detail schema accepts with only minLength: 1) found the group in the search but failed the exact-match filter, raising 404 for an existing group. A blank name likewise produced 404 instead of the 400 every sibling read path throws. It was the only name-based path not normalizing through requireName first.

The method now normalizes with requireName(name, "consumer group name") before searching and matching — the exact fix the issue proposes — so a padded name resolves the same group as the trimmed one, and a blank name is rejected with 400 before any provider resolution.

Three regression tests: a padded name exact-matches within provider search results (including a similarly-named sibling that must not leak in, and asserting the provider receives the trimmed search), a blank name rejects with 400 with no provider interaction, and the 404 message reports the normalized name. Suite 64/64.

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