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

Aperta
#4,446 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@marvelefe ci sta già lavorando.

Dal 25/10/2026.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
Rust
Stelle
5.3k
Fork
548
Merge medio
2g 20h
PR unite (30g)
194

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/iggy

Tutte le issue di apache/iggy

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.