Repository navigation
Open
Labels
enhancementA change that improves our (or users) QoLA change that improves our (or users) QoLtuiCommand line interface (iggy-cmd/iggy-cli) related changeCommand line interface (iggy-cmd/iggy-cli) related change
Description
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. server: consumer group member that joins while a revocation is pending never gets a 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 feat: add deferred polling timeout to PollMessages #3470 (deferred polling timeout) lands, use it in follow mode.
Metadata
Metadata
Assignees
Labels
enhancementA change that improves our (or users) QoLA change that improves our (or users) QoLtuiCommand line interface (iggy-cmd/iggy-cli) related changeCommand line interface (iggy-cmd/iggy-cli) related change
Activity
marvelefe commentedon Oct 25, 2026
I'd like to pick this up.
I'd build it on
IggyConsumer(core/sdk/src/clients/consumer.rs) as you suggest, turning off its automatic group creation, and implement in this order:--timestampfirst (maps directly toPollingStrategy::timestamp), then-gwith leave-on-exit/Ctrl-C/error, then--followwith the--poll-intervalfallback since #3470 isn't landed. I'll reject-gwith--transport httpbefore connecting (group join returnsFeatureUnavailable).Before I start: for
--follow, do you want the interval-based fallback now and a switch to deferred polling when #3470 lands, or should I wait on #3470?justinmclean commentedon Oct 25, 2026
@marvelefe the
--timestamppart was split out as #4461, which is assigned to de-authority with #4532 open, so start with-g. Your question on--follow(interval now, or wait for #3470) is for @hubcio.marvelefe commentedon Oct 27, 2026
Thanks @justinmclean — I'll drop --timestamp (covered by #4461/#4532) and start with -g. @hubcio, for --follow: use the --poll-interval fallback now and switch to deferred polling once #3470 lands, or wait? Could you assign #4446 to me?
hubcio commentedon Oct 27, 2026
@marvelefe deferred polling just landed
marvelefe commentedon Oct 27, 2026
Got it @hubcio. I'll use deferred polling. Starting on -g now.
marvelefe commentedon Oct 29, 2026
@hubcio The PR for
-g/--consumer-groupand--followis open: #4680