cli: poll messages as a consumer group, from a timestamp, and in follow mode
维护者通常 2 天内回复
@marvelefe 已经在做这个了。
开始于 2026年10月25日。
评估
调研方向
Start with core/cli/src/commands/binary_message/poll_messages.rs and the IggyConsumer implementation in core/sdk/src/clients/consumer.rs; compare the existing poll options with PollingStrategy::timestamp in core/common/src/types/message/polling_strategy.rs. Check the HTTP consumer-group limitation in core/sdk/src/http/consumer_groups.rs and account for the noted group/rebalancing behavior. Done means the CLI supports group, timestamp and follow modes with the specified conflicts, cleanup, transport rejection and auto-commit help text.
由索引模型根据 Issue 内容生成。
描述
Problem
iggy message poll reads one batch from one partition as a regular consumer.
- It always polls as a regular consumer (
core/cli/src/commands/binary_message/poll_messages.rs:64). You cannot read a topic the way a group member reads it. - It can start from
--offset,--first,--lastor--next(:55), but not from a timestamp. The SDK hasPollingStrategy::timestamp(core/common/src/types/message/polling_strategy.rs:72). - It reads one batch and exits. To watch a live partition, you must run it in a shell loop, for example with
--next --auto-commit. Each run connects and logs in again.
Proposal
- Add
-g, --consumer-group <GROUP>. The CLI joins the group and polls the partitions that the server assigns to it. On exit, it leaves the group, also after Ctrl-C or an error.-gconflicts with-c,--offsetand<PARTITION_ID>. - Add
--timestamp <TIME>. Accept an RFC 3339 time, Unix microseconds, or a duration back from now (15min). - Add
--follow. Keep polling until Ctrl-C, and wait for--poll-interval(default100ms) after an empty batch. - Build the group and follow modes on
IggyConsumer(core/sdk/src/clients/consumer.rs). It already joins the group, tracks the offset of each partition, commits, and leaves the group on shutdown. Turn off its automatic group creation.
Notes
- A member that disconnects without a leave keeps its partitions until
consumer_group.session_timeout(default 30 s) expires. - A join moves partitions from other members. A partition with uncommitted polled messages moves only after its owner commits them, or after
consumer_group.rebalancing_timeout(default 30 s). So a single-gpoll on a busy group often gets no partition. #4391 can also leave a new member without a partition. - With
--auto-commit, the group offset moves past the messages that the CLI prints, so the other members never get them. The help text must say this. - Over HTTP,
-gcannot work, because a group join returnsFeatureUnavailable(core/sdk/src/http/consumer_groups.rs:116). Reject-gwith--transport httpbefore the CLI connects. - The server has no long poll yet. When #3470 (deferred polling timeout) lands, use it in follow mode.
- 主要语言
- Rust
- 星标
- 5.3k
- 派生
- 548
- 平均合并
- 2 天 20 小时
- 30 天内合并 PR
- 194
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/iggy 的其他 Issue
-
go good first issue test
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 2 天内回复
-
go good first issue test
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 2 天内回复
-
go good first issue test
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 2 天内回复
-
good first issue java test
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 2 天内回复
-
good first issue javascript test
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 2 天内回复
相似的 Issue
-
marketing
难度 2/5 半天 新手友好度 62/100
维护者通常 1 天内回复
-
S: Untriaged T: Bug
难度 2/5 1-3 小时 新手友好度 72/100
libnyanpasu/clash-nyanpasu#6537 ·
维护者通常 1 天内回复
-
难度 2/5 1 小时以内 新手友好度 62/100
tauri-apps/tao#1445 ·
维护者通常 1 天内回复
-
bug P3
难度 1/5 1-3 小时 新手友好度 88/100
-
难度 1/5 1 小时以内 新手友好度 65/100
nearai/compose-manager#95 ·
维护者通常 1 天内回复