diff --git a/modules/reference/pages/rpk/rpk-topic/rpk-topic-consume.adoc b/modules/reference/pages/rpk/rpk-topic/rpk-topic-consume.adoc index 46842db279..fde2c43486 100644 --- a/modules/reference/pages/rpk/rpk-topic/rpk-topic-consume.adoc +++ b/modules/reference/pages/rpk/rpk-topic/rpk-topic-consume.adoc @@ -82,7 +82,7 @@ specification, similar to timestamps above. Unpacking text can allow translating binary input into readable output. If a value is a big-endian uint32, `%v` prints the raw four bytes, while -`%v{unpack[>I]}` prints the number in as ASCII. If unpacking exhausts the +`%v{unpack[>I]}` prints the number as ASCII. If unpacking exhausts the input before something is unpacked fully, an error message is appended to the output. @@ -103,7 +103,7 @@ of the above rules about `%K`, `%V`, text, and numbers apply. Values for consumed records can be omitted by using the `--meta-only` flag. -Tombstone records (records with a `null` value) have their value omitted from the JSON output by default. All other records, including those with an empty-string value (`""`), will have their values printed. +Tombstone records (records with a `null` value) have their value omitted from the JSON output by default. All other records, including those with an empty-string value (`""`), have their values printed. == Offsets @@ -257,4 +257,10 @@ any expression. |-v, --verbose |- |Enable verbose logging. |=== +== Connection behavior + +By default, `rpk topic consume` runs continuously, waiting for new records to arrive. It does not exit after consuming existing records. To stop consuming, press kbd:[Ctrl+C]. You can also use `--num` to exit after a fixed number of records, or use `--offset` (for example, `-o :end`) to stop at a specific offset. + +Records are formatted according to `--format`. The default, `--format json`, prints each record as a JSON object. + // end::single-source[] \ No newline at end of file