kafka教程-通过官方api发送消息、获取消息

kafka官方提供生产者api发送消息、消费者api获取消息

本系列教程使用 kafka_2.12-2.4.1 ,官网文档:

http://kafka.apache.org/24/documentation.html#producerapi

官方依赖:

<dependency>
    <groupId>org.apache.kafka</groupId>
    <artifactId>kafka-clients</artifactId>
    <version>2.4.1</version>
</dependency>

使用 kafka-clients 2.4.1版本操作 kafka_2.12-2.4.1

但本文不做该 api 的介绍,因为 一般都是通过springboot操作kafka


原文出处:/show_1IXNFn1Cbvq.html