dingshuangxi888 opened a new pull request, #11082:
URL: https://github.com/apache/rocketmq/pull/11082
### Which Issue(s) This PR Fixes
Follow-up to #11009; no separate issue.
### Brief Description
A Remoting consumer heartbeat containing a blank subscription topic is
rejected with `topic is null`, even when it also contains valid subscriptions.
Skip null, empty, and whitespace-only topic names when building heartbeat
authorization contexts so that the remaining subscriptions can be authorized.
Consumer-group and valid-topic SUB authorization contexts are preserved,
including group authorization when all subscription topics are blank. Missing
heartbeat bodies, null subscription entries, and invalid consumer-group names
remain rejected.
### How Did You Test This Change?
Added regression coverage for mixed valid/retry/blank topics, all-blank
topic subscriptions retaining group authorization, and null subscription entry
rejection.
Ran on JDK 11:
```sh
mvn -B -pl auth -am \
-Dtest=DefaultAuthorizationContextBuilderTest,AuthorizationEvaluatorTest \
-Dsurefire.failIfNoSpecifiedTests=false test
```
36 tests: 35 passed and 1 existing platform-specific test skipped.
Checkstyle and SpotBugs passed.
--
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]