kafka 和 kafka-clients 有什么区别? [英] What is the difference between kafka and kafka-clients?

查看:81
本文介绍了kafka 和 kafka-clients 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现 maven 仓库中有几个 kafka.

I found there are several kafka in the maven repo.

来自 apache 的 maven repo 中有两个 kafka.https://mvnrepository.com/artifact/org.apache.kafka/kafkahttps://mvnrepository.com/artifact/org.apache.kafka/kafka-客户

There are two kafka in the maven repo from apache. https://mvnrepository.com/artifact/org.apache.kafka/kafka https://mvnrepository.com/artifact/org.apache.kafka/kafka-clients

它们都可以从 kafka 服务器产生消息和消费消息.

Both of them can produce mesg and consume msg from kafka server.

我想知道创建两种客户端的原因.

I want to know the reason for create two kinds of client.

有什么区别,哪个更好?

Is there any difference and which one is better?

推荐答案

两者都可以从kafka服务器产生消息和消费消息

Both of them can produce mesg and consume msg from kafka server

只有一个客户端包,它作为另一个包的一部分包含在内.查看可以复制POM的部分下的编译依赖部分

There is only one clients package, it's included as part of the other. Look at the compile dependencies section under the section where you can copy the POM

如果您不打算运行嵌入式 Kafka 服务器或 Kafka 的任何其他运行时核心依赖项(例如 Kafka Connect 或 Kafka Streams,它们都有自己的独立依赖项),您只需要 kafka-clients 打包

If you don't plan on running an embedded Kafka server or any other runtime core dependency of Kafka (such as Kafka Connect or Kafka Streams, which have their own individual dependencies), you only need the kafka-clients package

这篇关于kafka 和 kafka-clients 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆