Kafka使用者不断将TCP数据包发送到Kafka服务器 [英] Kafka Consumer Continuously sending TCP packets to Kafka Server

查看:195
本文介绍了Kafka使用者不断将TCP数据包发送到Kafka服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个Kafka使用者,可以完美地使用消息.但问题是,当Kafka使用者启动时,该使用者正在向Kafka Broker发送大量TCP数据包.我可以使用Wireshark嗅探那些数据包.

We have a Kafka consumer which is consuming the messages perfectly. But the thing is , When the Kafka consumer started, the consumer is sending lot of TCP packets to Kafka Broker. I can sniff those packets using Wireshark.

我们的团队理解是,只要生产者产生消息,它就应该发送TCP数据包,而消费者应该能够通过向Broker发送请求来使用这些消息.(如事件驱动)

Our Team understanding is like, It should send the TCP packet whenever the message is getting produced by the Producer and the Consumer should be able to consume those messages by sending a request to Broker. (Like Event Driven)

我们真的不能理解为什么当消费者开始使用时,TCP数据包在代理和消费者之间不断地传输.

We cannot really understand why the TCP packets are getting transferred between the Broker and Consumer continuously when the consumer is getting started.

推荐答案

Kafka充当基于TCP的基于 pull 的系统.这就是为什么消费者不断发送TCP请求(实际上是poll()请求和心跳)的原因.您可以检查链接,以获取有关Kafka的此设计决策的更多信息.

Kafka works as a pull based system communicating over TCP. That's why consumers continuously send TCP requests (poll() request and heartbeats, actually). You can check this link for more information about this design decision of Kafka.

这篇关于Kafka使用者不断将TCP数据包发送到Kafka服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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