Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/commands/rhoas_kafka_topic.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions pkg/core/localize/locales/en/cmd/kafka.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,9 @@ one = '''
# Consume from a topic
$ rhoas kafka topic consume --name=topic-1

# Consume from topic and output yaml format
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this is problematic right now as command is hidden. I will remove it

$ rhoas kafka topic consume --name=topic-1 --format=yaml

# Consume from a topic and wait for messages produced since command was ran
$ rhoas kafka topic consume --name=topic-1 --wait

Expand All @@ -611,6 +614,15 @@ $ rhoas kafka topic consume --name=topic-1 --wait --from=2022-06-17T07:05:34+00:

# Consume from a topic starting from a certain time using unix time format
$ rhoas kafka topic consume --name=topic-1 --wait --unix-time --from=812762

# Consume from a topic starting from an offset
$ rhoas kafka topic consume --name=topic-1 --offset=15

# Consume from a topic starting from an offset with a message limit of 30
$ rhoas kafka topic consume --name=topic-1 --offset=15 --limit=30

# Consume from topic to json format and use jq to read values of returning json
$ rhoas kafka topic consume --name=topic-1 --format=json | jq -rc .value
'''

[kafka.topic.consume.flag.partition.description]
Expand Down Expand Up @@ -774,6 +786,9 @@ $ rhoas kafka topic produce --name=topic-1 --file="./value.json" --key=my-value

# Produce to a topic and be prompted to enter a value
$ rhoas kafka topic produce --name=topic-1

# Produce to a topic with json filtered with jq as the value
$ cat input.json | jq .data.value | rhoas kafka topic produce --name=topic-1
'''

[kafka.topic.create.error.topicNameIsRequired]
Expand Down
6 changes: 6 additions & 0 deletions pkg/core/localize/locales/en/cmd/topic.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@ rhoas kafka topic create --name mytopic

# List all topics
rhoas kafka topic list

# Produce message from file to topic
rhoas kafka topic produce --name mytopic --file message.json

# Consume 10 most recent messages from topic
rhoas kafka topic consume --name mytopic --limit 10
'''