youngkermit8-coder opened a new issue, #5127:
URL: https://github.com/apache/rocketmq-dashboard/issues/5127
### Before Creating the Bug Report
- [x] I searched open and closed issues/PRs and believe this is not an
equivalent duplicate.
- [x] This is a defect in RocketMQ Studio, not a usage question or a Broker
defect.
- [x] The exact tested branch and commit are stated below.
### Studio Version
Branch: `rocketmq-studio`
Commit: `4ee173ad71ae777f01111394a88358958b9abad6` (current branch head
checked on 2026-09-27).
Built/tested from source; not a live deployment reproduction.
### Runtime Environment
Windows, Temurin JDK 21.0.12, Maven 3.9.9. This is a deterministic provider
unit-test reproduction with mocked `MQAdminExt`; no MySQL, browser, or live
Broker is involved in the executed test.
### Connected RocketMQ Cluster
No live cluster was used. The fixture models one Broker and one Lite
consumer group with two clients subscribing to different LiteTopics. The
protocol semantics were checked against the official RocketMQ 5.5.0 source,
matching Studio's current dependency.
### Describe the Bug
LiteTopic session detail computes `consumedMessages` from the selected
client's subscribed LiteTopics, but obtains `pendingMessages` from a group-wide
query. It then adds counters with different scopes to form `totalMessages`.
This affects the session detail page's counters/consumption percentage and
the `rmq.litetopic.session` tool output.
For example:
| Session | Subscribed LiteTopic | Committed offset | Broker offset |
Pending |
| --- | --- | ---: | ---: | ---: |
| c1 | bob | 10 | 15 | 5 |
| c2 | alice | 20 | 120 | 100 |
The group-wide backlog is 105. The c1 session should not inherit c2's 100
pending messages. An empty subscription also should not inherit other clients'
backlog.
### Steps to Reproduce
1. Use the stated `rocketmq-studio` commit.
2. In the existing `RocketMQLiteTopicProviderTest`, add the following tests
(using its existing setup and helpers):
```java
@Test
void sessionBacklogShouldOnlyIncludeTheClientsSubscribedLiteTopicsTest()
throws Exception {
when(admin.examineBrokerClusterInfo()).thenReturn(cluster(BROKER_A));
when(admin.getLiteClientInfo(BROKER_A, PARENT, GROUP, "c1"))
.thenReturn(clientInfo(1, System.currentTimeMillis(),
LiteUtil.toLmqName(PARENT, "bob")));
when(admin.getLiteClientInfo(BROKER_A, PARENT, GROUP, "c2"))
.thenReturn(clientInfo(1, System.currentTimeMillis(),
LiteUtil.toLmqName(PARENT, "alice")));
when(admin.getLiteGroupInfo(BROKER_A, GROUP, null,
1)).thenReturn(lag(105));
GetLiteGroupInfoResponseBody bob = consumed(15, 10);
bob.setTotalLagCount(5);
when(admin.getLiteGroupInfo(BROKER_A, GROUP, "bob", 1)).thenReturn(bob);
GetLiteGroupInfoResponseBody alice = consumed(120, 20);
alice.setTotalLagCount(100);
when(admin.getLiteGroupInfo(BROKER_A, GROUP, "alice",
1)).thenReturn(alice);
LiteTopicSession first = provider.getSession(
RocketMQLiteTopicProvider.encodeSessionId(PARENT, GROUP, "c1"));
LiteTopicSession second = provider.getSession(
RocketMQLiteTopicProvider.encodeSessionId(PARENT, GROUP, "c2"));
assertThat(first.getLiteTopics()).containsExactly("bob");
assertThat(first.getPendingMessages()).isEqualTo(5L);
assertThat(first.getConsumedMessages()).isEqualTo(10L);
assertThat(first.getTotalMessages()).isEqualTo(15L);
assertThat(second.getLiteTopics()).containsExactly("alice");
assertThat(second.getPendingMessages()).isEqualTo(100L);
assertThat(second.getConsumedMessages()).isEqualTo(20L);
assertThat(second.getTotalMessages()).isEqualTo(120L);
}
@Test
void emptySessionShouldNotInheritOtherClientsBacklogTest() throws Exception {
when(admin.examineBrokerClusterInfo()).thenReturn(cluster(BROKER_A));
when(admin.getLiteClientInfo(BROKER_A, PARENT, GROUP, "c1"))
.thenReturn(clientInfo(0, System.currentTimeMillis()));
when(admin.getLiteGroupInfo(BROKER_A, GROUP, null,
1)).thenReturn(lag(105));
LiteTopicSession session = provider.getSession(
RocketMQLiteTopicProvider.encodeSessionId(PARENT, GROUP, "c1"));
assertThat(session.getLiteTopics()).isEmpty();
assertThat(session.getPendingMessages()).isZero();
assertThat(session.getTotalMessages()).isZero();
}
```
3. Run `cd server && mvn -B -ntp -Dtest=RocketMQLiteTopicProviderTest test`.
### What Did You Expect to See?
c1: `pendingMessages=5`, `consumedMessages=10`, `totalMessages=15` (about
67% consumed).
Empty subscription: zero pending/total messages.
### What Did You See Instead?
c1: `pendingMessages=105`, `consumedMessages=10`, `totalMessages=115` (about
9% consumed).
Empty subscription: `pendingMessages=105`, `totalMessages=105`.
Executed baseline result:
```text
Tests run: 27, Failures: 2, Errors: 0, Skipped: 0
sessionBacklogShouldOnlyIncludeTheClientsSubscribedLiteTopicsTest:
expected: 5L, but was: 105L
emptySessionShouldNotInheritOtherClientsBacklogTest:
expected: 0L, but was: 105L
```
All 25 pre-existing tests passed; Checkstyle reported 0 violations.
Production source was not modified. No repair or green verification is claimed.
### Additional Context
The mismatch is visible in
[`buildSession`](https://github.com/apache/rocketmq-dashboard/blob/4ee173ad71ae777f01111394a88358958b9abad6/server/src/main/java/org/apache/rocketmq/studio/provider/apache/RocketMQLiteTopicProvider.java#L307):
`sessionGroupLag` has no LiteTopic filter, while `consumedMessages` iterates
the selected client's `liteTopicSet`.
The official [RocketMQ 5.5.0 `getLiteGroupInfo`
implementation](https://github.com/apache/rocketmq/blob/rocketmq-all-5.5.0/broker/src/main/java/org/apache/rocketmq/broker/processor/LiteManagerProcessor.java#L264)
returns group-wide lag when the LiteTopic filter is absent; its filtered
branch returns that LiteTopic's lag and offsets.
Please confirm that session progress should describe the selected client's
subscribed LiteTopics. The proposed scope is to calculate consumed/pending
totals from the same per-LiteTopic responses while preserving operational
failure handling. Scan-limit and multi-broker behavior need verification before
an implementation.
Duplicate check on 2026-09-27 included the open PR inventory and title/body
searches across all states for LiteTopic/session, session/backlog,
session/pendingMessages and lite/progress. #4562 changes parent-topic summary
aggregation, not session progress. #4536 handles failed reads, not successful
reads with mismatched scopes. #5109 concerns Aliyun group progress. No
equivalent open fix was found within that search scope.
AI-assisted source/protocol analysis and regression drafting; baseline tests
were executed locally. This report contains only synthetic resource names and
counts.
### Are You Willing to Submit a Pull Request?
- [x] Yes, after the intended scope is confirmed; any implementation would
target `rocketmq-studio` as required by current CONTRIBUTING.md.
--
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]