This chapter covers:
- Exploring the consumer read path and how it works
- Learning about offsets and their use
- Examining various configuration options for consumer clients
In our previous chapter, we started working with writing data into our Kafka system. However, as you know, that is only one part of the story. Consumers are the way that we get data from Kafka and to other systems or applications that use that data to provide value. Since consumers are clients that can exist outside of brokers, they have the same language options available as we do the producer clients. Please take note that when we are looking at how things work below, I will try to lean towards the defaults of the Java consumer client.
After reading this chapter, we will be on our way to solving our previous business requirements by consuming data in a couple of different ways.
The consumer client is the program that subscribes to the topic or topics that it is interested in. As with producers, the actual consumer processes can run on separate machines. Consumers are not required to run on a specific server, as long as they can connect to the message brokers, they are good to read messages.
Figure 5.1. Kafka Consumers