本文介绍了如何在Java中获取消费者Kafka滞后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Java中有一个生产者,在NodeJS中有一个消费者.我想在Java中知道什么是消费者滞后,所以我知道是否可以针对该主题生成更多数据.
I have a producer in java and consumer in nodeJS. I want to know in java what is the consumer lag, so i know if i can produce more data to the topic.
Java中导致消费者滞后的API是什么?
What is the API in java to get the consumer lag?
推荐答案
为什么需要知道消费者的滞后?代理的目的是异步生成消息.如果需要同步处理,请使用基本的剩余处理.
Why do you need to know the consumer lag ? The aim of a broker is to produce messages asynchronously. If you need to have a synchronous processing, use a basic rest processing.
这篇关于如何在Java中获取消费者Kafka滞后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!