Click to copy
Working With Topics • Reviewed for ksqlDB 0.29
How to Read Messages from Topic in ksqlDB
To read new messages that are being produced on a topic, you can use the PRINT
command:
PRINT topicName;
Don’t forget to quote the topic if the name has non-alphanumeric characters, such as dots or dashes .
PRINT 'topic-name';
If you are only interested in reading a sample of messages on a topic, you can do so by limiting the output. Alternatively, you can choose to read the topic from the beginning.
Was this article helpful?