iloveeyjafjalla opened a new pull request, #11372:
URL: https://github.com/apache/rocketmq/pull/11372

   ### Which Issue(s) This PR Fixes
   
   - Fixes #11371
   
   ### Brief Description
   
   `AdminModelConverter#toMessageModel` mapped every consumption model except 
`BROADCASTING` to `CLUSTERING`, so
   `MessageModel.LITE_SELECTIVE` — which the proxy produces for lite consumers 
(`ClientActivity#buildMessageModel` for
   `LITE_PUSH_CONSUMER` / `LITE_SIMPLE_CONSUMER`) — was reported as a plain 
clustering group. The admin proto has the exact
   value for it (`LITE_SELECTIVE = 3`, "Consumers of the group selectively 
subscribe to individual lite topics that are
   multiplexed onto a shared physical topic"), so `ListSubscription` / 
`DescribeSubscription` / `ListConsumerConnection`
   told a console that lite-selective consumers were ordinary clustering 
consumers.
   
   The change adds the `LITE_SELECTIVE` case and leaves `BROADCASTING` / 
`CLUSTERING` / any unknown value as they were.
   
   ### How Did You Test This Change?
   
   - `AdminModelConverterTest#toMessageModelMapsValuesTest` now asserts 
`LITE_SELECTIVE → LITE_SELECTIVE` in addition to the
     existing BROADCASTING / CLUSTERING / null cases.
   - 
`ProxyAdminGrpcServiceTest#listSubscriptionReportsLiteSelectiveMessageModelTest`
 drives the RPC path: a broker-side
     `ConsumerConnection` with `LITE_SELECTIVE` must be reported as 
`LITE_SELECTIVE` in `ListSubscription`.
   
   Results on Temurin JDK 8 (same JDK as CI), base `9ea2ccdc2` plus this patch:
   
   - before the fix: `expected:<LITE_SELECTIVE> but was:<CLUSTERING>` (both 
tests)
   - after the fix: `AdminModelConverterTest — Tests run: 22, Failures: 0` and
     `ProxyAdminGrpcServiceTest — Tests run: 61, Failures: 0, Errors: 0` (83 
tests together, 0 failures)
   - `mvn -B -ntp -pl proxy package` with checkstyle + spotbugs enabled: `BUILD 
SUCCESS`, spotbugs `BugInstance size is 0`
   
   This change was prepared with AI assistance (analysis, patch and test 
drafting); the diff and every result above were
   reproduced locally by running the module's tests against the base commit and 
the patched tree.
   


-- 
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]

Reply via email to