Skip to Content
Kafka权威指南
book

Kafka权威指南

by Neha Narkhede, Gwen Shapira, Todd Palino
January 2018
Beginner to intermediate
234 pages
7h 8m
Chinese
Posts & Telecom Press
Content preview from Kafka权威指南
182
10
10-17:需要监控的度量指标
客户端 MBean
消费者
kafka.consumer:type=consumer-fetch-manager-metrics,client-id=CLIENTID
的属性
fetch-throttle-time-avg
生产者
kafka.producer:type=producer-metrics,client-id=CLIENTID
的属性
produce-throttle-time-avg
默认情况下,
broker
不会开启配额功能。不过不管有没有使用配额,监控这些指标总是没
有问题的。况且,它们有可能在未来某个时刻被启用,而且从一开始就监控它们要比在后
期添加更加容易。
10.4
 延时监控
对于消费者来说,最需要被监控的指标是消费者的延时。它表示分区最后一个消息和消费
者最后读取的消息之间相差的消息个数。在之前的小节里已经说过,在这里,使用外部监
控要比使用客户端自己的监控好得多。虽然消费者提供了延时指标,但该指标存在一个问
题,它只表示单个分区的延时,也就是具有最大延时的那个分区,所以它不能准确地表示
消费者的延时。另外,它需要消费者做一些额外的操作,因为该指标是由消费者对每个发
出的请求进行计算得出的。如果消费者发生崩溃或者离线,那么该指标要么不准确,要么
不可用。
监控消费者延时最好的办法是使用外部进程,它能够观察
broker
的分区状态,跟踪最近消
息的偏移量,也能观察消费者的状态,跟踪消费者提交的最新偏移量。这种方式提供了一
种持续更新的客观视图,而且不依赖消费者的状态。我们需要在每一个分区上进行这种检 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

精通機器學習

精通機器學習

Aurélien Géron
精通特征工程

精通特征工程

Alice Zheng, Amanda Casari
高效能PYTHON程式設計

高效能PYTHON程式設計

Micha Gorelick, Ian Ozsvald

Publisher Resources

ISBN: 9787115473271