Skip to content

Getting Next Message via API #16914

Answered by rockwotj
cyberience asked this question in F.A.Q.
Discussion options

You must be logged in to vote

@cyberience you can do a few things, pass --offset=1 to get the next message. You could adjust --num=2 to get both messages, or pass --offset=-1 to get the latest message always (in conjunction with --num=1). --num is really more like --limit, if you remove that flag you can get all messages for the topic

The help text for this command is quite good too, so you can pass --help or read the help online here: https://docs.redpanda.com/current/reference/rpk/rpk-topic/rpk-topic-consume/

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rockwotj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
F.A.Q.
Labels
None yet
2 participants