cli: poll messages as a consumer group, from a timestamp, and in follow mode

オープン
#4,446 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@marvelefe がすでに取り組んでいます。

2026年10月25日 から。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
cli

調査の方向性

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 の本文から書いたものです。

説明

enhancement tui

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, --last or --next (:55), but not from a timestamp. The SDK has PollingStrategy::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. -g conflicts with -c, --offset and <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 (default 100ms) 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 -g poll 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, -g cannot work, because a group join returns FeatureUnavailable (core/sdk/src/http/consumer_groups.rs:116). Reject -g with --transport http before 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時間
マージ済み PR(30日)
194

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/iggy のほかの issue

apache/iggy の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。