Click to copy
Working With Topics • 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';
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
.
Was this article helpful?