Click to copy

• Reviewed for ksqlDB 0.29

How to Read Latest Messages from a Topic in ksqlDB

You can use the PRINT command to read the latest messages from a topic. After you submit the command, you will be able to see newly produced messages.

PRINT 'topicName';

Read the latest 100 messages

To date (version 0.27), the PRINT command isn’t yet capable of printing the latest N messages that were produced before you submitted the command. A workaround is to create a STREAM from the topic and query the last 100 messages from the stream .

Discover what readers are saying
topictale
Get easy to digest how-tos on ksqlDB
Sign up
Please read our Privacy Policy to understand how we protect and manage your data.
You may also like