Topic Consumers
Use topic consumer mode to read topic records directly from a terminal.
Flags
| Option | Description |
|---|---|
--consume | Enable topic consumer mode. |
--topic <TOPIC> | Topic name (required with --consume). |
--group <GROUP_ID> | Consumer group (offsets committed when set). |
--from <earliest|latest|OFFSET> | Start position; supports numeric offset. |
--consume-limit <N> | Maximum messages before exit. |
--consume-timeout <SECONDS> | Stop after idle window. |
--consume takes precedence over --file and --command.
Examples
Interactive command
SQL alternative
For explicit offset control, use SQL:
--consume and \consume are convenience shells around topic consumption. Use CONSUME FROM and ACK when scripting.
Related
Last updated on