1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Apache Kafka

Connected

Exercise

Console consumer

Now that you've worked with topics and producers, you decide to see how Kafka consumers can provide a list of phishing information to your company's software. You want to work through a few examples of how to read data from a Kafka topic.

Instructions 1/2

undefined XP
  • 1
    • Use the appropriate Kafka command (bin/kafka-console-consumer.sh ...) to read events from the Kafka topic phishing-sites. Read all messages from the beginning of the topic, and then use control+c to exit.
  • 2
    • Now let's assume your application can only handle 3 messages at a time. Modify your console command to read 3 messages and exit automatically.