Usage
要使用 Apache Kafka 粘合器,你需要将 spring-cloud-stream-binder-kafka
作为依赖项添加到 Spring Cloud Stream 应用程序,如下面的 Maven 示例所示:
To use Apache Kafka binder, you need to add spring-cloud-stream-binder-kafka
as a dependency to your Spring Cloud Stream application, as shown in the following example for Maven:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-kafka</artifactId>
</dependency>
或者,你还可以使用 Spring Cloud Stream Kafka Starter,如下面的 Maven 示例所示:
Alternatively, you can also use the Spring Cloud Stream Kafka Starter, as shown in the following example for Maven:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-kafka</artifactId>
</dependency>