先创建Maven工程导入jar包

帮助文档地址:http://kafka.apachecn.org/documentation.html#api

<dependencies>
<!-- https://mvnrepository.com/artifact/org.apache.kafka/kafka-clients -->
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams</artifactId>
<version>1.0.0</version>
</dependency> </dependencies> <build>
<plugins>
<!-- java编译插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>

Producer API

查看相关文章:【Kafka】Producer API

Consumer API

查看相关文章:【Kafka】Consumer API

Stream API

查看相关文章:【Kafka】Stream API

最新文章

  1. [Erlang 0121] 当我们谈论Erlang Maps时,我们谈论什么 Part 3
  2. 基于java代码的Spring-mvc框架配置
  3. 【ecos学习1】wmware运行redboot[方法一]--脚本实现配置
  4. Microsoft2013校园招聘笔试题及解答
  5. 使用.net备份和还原数据库
  6. MP4视频编码器
  7. word加载项打包发布注意事项总结
  8. 如何使用 ui-router-extras
  9. docker下编译mangoszero WOW60级服务端(一)
  10. 同步Name到Comment 及 同步 Comment 到Name
  11. 在SOUI中使用线性布局
  12. asp.net mvc5中使用Swagger 自动生成WebApi文档笔记
  13. Python Day 13 装饰器
  14. SSH登录启用Google二次身份验证
  15. expdp ORA-39070:Unable to open the log file
  16. Struts2输入校验(XML方式)
  17. hive 排序 order by sort by distribute by cluster by
  18. spark 调优——基础篇
  19. 悲催的IE6 七宗罪大吐槽(带解决方法)第三部分
  20. [转]php-fpm - 启动参数及重要配置详解

热门文章

  1. App的数据如何用python抓取
  2. cool-yogurt小组采访感想
  3. 全平台阅读器 StartReader
  4. 设计模式-原型模式(Prototype)【重点:浅复制与深复制】
  5. AppBoxFuture: Web在线报表设计与PDF生成
  6. linq详细案例
  7. RT-Thread—STM32—在线升级(Ymodem_OTA、HTTP_OTA)
  8. Content-Type 四种常见的 POST 提交数据方式
  9. 带你玩linux集成环境
  10. 利用python画出动态高优先权优先调度