Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

41
kcat Normal file
View File

@@ -0,0 +1,41 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# kcat
> Apache Kafka producer and consumer tool.
> More information: <https://github.com/edenhill/kcat>.
- Consume messages starting with the newest offset:
`kcat -C -t {{topic}} -b {{brokers}}`
- Consume messages starting with the oldest offset and exit after the last message is received:
`kcat -C -t {{topic}} -b {{brokers}} -o beginning -e`
- Consume messages as a Kafka consumer group:
`kcat -G {{group_id}} {{topic}} -b {{brokers}}`
- Publish message by reading from `stdin`:
`echo {{message}} | kcat -P -t {{topic}} -b {{brokers}}`
- Publish messages by reading from a file:
`kcat -P -t {{topic}} -b {{brokers}} {{path/to/file}}`
- List metadata for all topics and brokers:
`kcat -L -b {{brokers}}`
- List metadata for a specific topic:
`kcat -L -t {{topic}} -b {{brokers}}`
- Get offset for a topic/partition for a specific point in time:
`kcat -Q -t {{topic}}:{{partition}}:{{unix_timestamp}} -b {{brokers}}`