[Bug] AdminSendMessage keeps only the first system property key, dropping the rest
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- java
调研方向
Start in ProxyAdminGrpcService.buildAdminMessage and compare its handling of AdminSendMessageRequest.system_properties.keys with SendMessageActivity and the existing adminSendMessageCarriesTagsKeysAndPropertiesTest in ProxyAdminGrpcServiceTest. Extend the test to cover multiple non-empty keys, empty entries, and precedence over the singular key, then run that test on the repository's supported JDK. Done means all non-empty repeated keys are space-joined and the existing singular-key behavior remains covered.
由索引模型根据 Issue 内容生成。
描述
Search before asking
I checked open and closed issues and PRs for AdminSendMessage, system_properties.keys, buildAdminMessage and setKeys. The open work on this class (#11356 / PR #11357 on message-group queue selection, #11406 on retry-topic ACL) does not touch the message-key path, and no existing report covers the repeated keys field.
What happened?
AdminSendMessageRequest.system_properties.keys is a repeated field, and the data plane keeps every entry: SendMessageActivity validates each key and calls Message.setKeys(Collection), which joins the list. The admin surface does not. ProxyAdminGrpcService.buildAdminMessage reads the same field but keeps only the first non-empty entry:
for (String key : systemProperties.getKeysList()) {
if (!key.isEmpty()) {
message.setKeys(key);
break;
}
}
Send a message through AdminSendMessage with system_properties.keys = ["k1", "k2", "k3"] and the stored message carries only k1. The RPC answers OK with a message id, so nothing tells the caller that two index keys vanished. Messages keyed this way are then only findable by k1 in key-based queries, which is the whole point of sending keys.
The singular key field still works (covered by the existing adminSendMessageCarriesTagsKeysAndPropertiesTest); only the repeated system_properties.keys path is lossy.
Runtime
develop at 57c2dc0, Temurin 11 (the pinned surefire/ByteBuddy stack does not run on JDK 21). Reproduced with the existing ProxyAdminGrpcServiceTest mocks — no broker needed. On the unpatched service, the new test fails with:
expected:<key1[ key2 key3]> but was:<key1[]>
Expected behavior
Every non-empty entry of system_properties.keys ends up on the message, space-joined like the data plane does. Empty entries are skipped. Precedence stays as it is today: a non-empty system_properties.keys overrides the singular key; an all-empty list leaves the singular key in place.
- 主要语言
- Java
- 星标
- 22.7k
- 派生
- 12k
- 平均合并
- 3 天 18 小时
- 30 天内合并 PR
- 17
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/rocketmq 的其他 Issue
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configuration可能已有人在做 @amalsaidov 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
CompressionType.of fails under the Turkish locale可能已有人在做 @sharanggupta 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
[rocketmq-client-python] TransactionMQProducer allocates an unused producer during initialization未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
[Bug] notifyMasterOnline aborts the long-polling wake-up with a NullPointerException when an arrival drains a bucket first可能已有人在做 @iloveeyjafjalla 于 29 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
apache/rocketmq#11441 · 1 条评论 ·
维护者通常 1 天内回复
-
[Enhancement] FilterFactory duplicate-registration and unregister semantics lack tests可能已有人在做 @chennaji9 于 34 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
apache/rocketmq#11340 · 2 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
bug emitter:client:csharp
难度 2/5 1-3 小时 新手友好度 84/100
microsoft/typespec#12572 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)未关闭
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
needs-area-label
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
area/ai area/backend component/zeebe kind/task
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
spAnser/reacharound#38 ·