官术网_书友最值得收藏!

Deep Dive into Kafka Consumers

Every messaging system has two types of data flows. One flow pushes the data to the Kafka queues and the other flow reads the data from those queues. In the previous chapter, our focus was on the data flows that are pushing the data to Kafka queues using producer APIs. After reading the previous chapter, you should have sufficient knowledge about publishing data to Kafka queues using producer APIs in your application. In this chapter, our focus is on the second type of data flow--reading the data from Kafka queues.

Before we start with a deep dive into Kafka consumers, you should have a clear understanding of the fact that reading data from Kafka queues involves understanding many different concepts and they may differ from reading data from traditional queuing systems.

With Kafka, every consumer has a unique identity and they are in full control of how they want to read data from each Kafka topic partition. Every consumer has its own consumer offset that is maintained in Zookeeper and they set it to the next location when they read data from a Kafka topic.

In this chapter, we will cover different concepts of Kafka consumers. Overall, this chapter covers how to consume messages from Kafka systems along with Kafka consumer APIs and their usage. It will walk you through some examples of using Kafka consumer APIs with Java and Scala programming languages and take a deep dive with you into consumer message flows along with some of the common patterns of consuming messages from Kafka topics.

We will cover the following topics in this chapter:

  • Kafka consumer internals
  • Kafka consumer APIs
  • Java Kafka consumer example
  • Scala Kafka consumer example
  • Common message consuming patterns
  • Best practices
主站蜘蛛池模板: 沁源县| 云梦县| 怀安县| 栾城县| 沙田区| 海安县| 彭山县| 郑州市| 海原县| 兴城市| 南木林县| 楚雄市| 卢湾区| 阿克陶县| 太康县| 太白县| 怀来县| 克什克腾旗| 陇西县| 芒康县| 清流县| 广宁县| 双柏县| 海晏县| 八宿县| 砚山县| 木里| 故城县| 高平市| 兴隆县| 通渭县| 青川县| 蓬安县| 遂昌县| 曲靖市| 江北区| 慈利县| 崇阳县| 阳谷县| 托克逊县| 天等县|