1.1 Introduction中 Apache Kafka™ is a distributed streaming platform. What exactly does that mean?(官网剖析)(博主推荐)

时间:2022-05-29 22:38:02

  不多说,直接上干货!

  一切来源于官网

http://kafka.apache.org/documentation/

1.1 Introduction中  Apache Kafka™ is a distributed streaming platform. What exactly does that mean?(官网剖析)(博主推荐)

Apache Kafka™ is a distributed streaming platform. What exactly does that mean?

Kafka是一个分布式流数据处理平台。这到底是什么意思呢?

We think of a streaming platform as having three key capabilities:

我们认为一个流数据处理平台必须具备三个关键功能:
  1. It lets you publish and subscribe to streams of records. In this respect it is similar to a message queue or enterprise messaging system.
  2. It lets you store streams of records in a fault-tolerant way.
  3. It lets you process streams of records as they occur.
1、它允许你发布订阅流数据,在这方面,他类似一个消息队列或企业级消息系统(消息中间件);
2、它让你存储的流式数据具有容错机制;
3、它让你能实时处理流式数据

What is Kafka good for?

It gets used for two broad classes of application:

Kafka有什么好处? 它被用于两大类别的程序:
  1. Building real-time streaming data pipelines that reliably get data between systems or applications
  2. Building real-time streaming applications that transform or react to the streams of data
1、在系统和应用之间构建实时、可靠获取数据的流数据管道
2、构建用于数据转换、数据重复处理的实时流数据应用

To understand how Kafka does these things, let's dive in and explore Kafka's capabilities from the bottom up.

要想明白kafka如何做这些事情,需要我们从上到下深入探索kafka的功能。 

First a few concepts:

  • Kafka is run as a cluster on one or more servers.
  • The Kafka cluster stores streams of records in categories called topics.
  • Each record consists of a key, a value, and a timestamp.
先熟悉几个概念:
  1、kafka可以作为集群运行在一个或多个的服务器上;
  2、kafka集群存储流数据类别的称为topic。
  3、每条记录由一个key,value,timestamp组成的。

Kafka has four core APIs:

  • The Producer API allows an application to publish a stream of records to one or more Kafka topics.
  • The Consumer API allows an application to subscribe to one or more topics and process the stream of records produced to them.
  • The Streams API allows an application to act as a stream processor, consuming an input stream from one or more topics and producing an output stream to one or more output topics, effectively transforming the input streams to output streams.
  • The Connector API allows building and running reusable producers or consumers that connect Kafka topics to existing applications or data systems. For example, a connector to a relational database might capture every change to a table.
Kafka有4个核心的APIs:
  Producer API:允许某个应用程序发布流数据到一个或多个kafka topic
  Consumer API:允许某个应用程序订阅一个或多个kafka topic同时处理生产的流数据。
  Streams API:允许某应用程序作为流处理器,消费一个或多个topic输入流和生产一个或多个topic输出流,高效地转换输入输出流。
  Connector API:允许构建和运行可重用的生产者或消费者,连接kafka topic到现有的应用程序或数据系统、例如:一个连接到关系型数据库可能需要捕获一张表的每次改变。(可作为数据库日志同步功能)

1.1 Introduction中  Apache Kafka™ is a distributed streaming platform. What exactly does that mean?(官网剖析)(博主推荐)

In Kafka the communication between the clients and the servers is done with a simple, high-performance, language agnostic TCP protocol. This protocol is versioned and maintains backwards compatibility with older version. We provide a Java client for Kafka, but clients are available in many languages.

在kafka中,客户端和服务器之间的通信采用简单的,高性能,开发语言无关的TCP协议。这种协议是有版本的,并且保持向后兼容性。
Kafka提供了一个Java的客户端,同时也提供其他开发语言的客户端。