Skip to Content
Kafka权威指南
book

Kafka权威指南

by Neha Narkhede, Gwen Shapira, Todd Palino
January 2018
Beginner to intermediate
234 pages
7h 8m
Chinese
Posts & Telecom Press
Content preview from Kafka权威指南
8
1
消费者从一个集群读取消息,生产者把消息发送到另一个集群上。图
1-8
展示了一个使
MirrorMaker
的例子,两个“本地”集群的消息被聚集到一个“聚合”集群上,然后将
该集群复制到其他数据中心。不过,这种方式在创建复杂的数据管道方面显得有点力不从
心。第
7
章将详细讨论这些案例。
生产者
数据中心A 数据中心B
数据中心C
生产 生产
生产
生产者消费者 消费者
消费
消费者 消费者
Kafka本地集群 Kafka本地集群
Kafka聚合集群 Kafka聚合集群
Kafka聚合集群
消费 消费
MirrorMaker
MirrorMaker
MirrorMaker
1-8:多数据中心架构
1.3
 为什么选择
Kafka
基于发布与订阅的消息系统那么多,为什么
Kafka
会是一个更好的选择呢?
1.3.1
 多个生产者
Kafka
可以无缝地支持多个生产者,不管客户端在使用单个主题还是多个主题。所以它很
适合用来从多个前端系统收集数据,并以统一的格式对外提供数据。例如,一个包含了多
个微服务的网站,可以为页面视图创建一个单独的主题,所有服务都以相同的消息格式向
该主题写入数据。消费者应用程序会获得统一的页面视图,而无需协调来自不同生产者的
数据流。
1.3.2
 多个消费者
除了支持多个生产者外,
Kafka
也支持多个消费者从一个单独的消息流上读取数据,而且
消费者之间互不影响。这与其他队列系统不同,其他队列系统的消息一旦被一个客户端读
取,其他客户端就无法再读取它。另外,多个消费者可以组成一个群组,它们共享一个消
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

精通機器學習

精通機器學習

Aurélien Géron
精通特征工程

精通特征工程

Alice Zheng, Amanda Casari
高效能PYTHON程式設計

高效能PYTHON程式設計

Micha Gorelick, Ian Ozsvald

Publisher Resources

ISBN: 9787115473271