Overview

Spring Cloud Stream 包含一个明确设计用于 Apache Kafka Streams 绑定的粘合剂实现。通过这种原生集成,Spring Cloud Stream“处理器”应用可以在核心业务逻辑中直接使用 Apache Kafka Streams API。

Spring Cloud Stream includes a binder implementation designed explicitly for Apache Kafka Streams binding. With this native integration, a Spring Cloud Stream "processor" application can directly use the Apache Kafka Streams APIs in the core business logic.

Kafka Streams 粘合剂实现建立在 Spring for Apache Kafka 项目提供的基础上。

Kafka Streams binder implementation builds on the foundations provided by the Spring for Apache Kafka project.

Kafka 流绑定器为 Kafka 流中的三种主要类型提供了绑定功能 - KStreamKTableGlobalKTable

Kafka Streams binder provides binding capabilities for the three major types in Kafka Streams - KStream, KTable and GlobalKTable.

Apache Kafka Streams 应用程序通常遵循一个模型,其中记录从入站主题读取,应用业务逻辑,然后将转换后的记录写入出站主题。或者,还可以定义没有出站目标的处理器应用程序。

Kafka Streams applications typically follow a model in which the records are read from an inbound topic, apply business logic, and then write the transformed records to an outbound topic. Alternatively, a Processor application with no outbound destination can be defined as well.

在以下部分中,我们将介绍 Spring Cloud Stream 与 Kafka Streams 集成的详细信息。

In the following sections, we are going to look at the details of Spring Cloud Stream’s integration with Kafka Streams.