From the course: Apache Kafka Essential Training: Getting Started

Unlock this course with a free trial

Join today to access over 25,400 courses taught by industry experts.

Consuming partitioned data

Consuming partitioned data

- [Instructor] In this video, let's consume the data published into the kafka.learning.orders topic using consumer groups and track offsets. We have opened four Shell windows, each of which is started by using the docker exec command into the Kafka container, and then navigating to the bin directory as shown in the previous chapters. In the first window on the top left, we start the publisher to publish to the orders topic. In the window on the top right, we start the first consumer. Here, to specify a consumer group, we use the group parameter and specify a group string called test-consumer-group. We specify the print key property to print the key also. The key.separator specifies the character used to separate the key and value while printing the data to the console. We will use the equal-to character for this. We also subscribe from the beginning. Let's run this consumer. We immediately see all the messages we…

Contents