apache kafka – Correct spring-kaka metric for the throughput of a consumption

I am building a consumer app using spring-kaka.
It comes out of the box with useful metrics.
I wish to find which one is the most relevant to get the throughput of my consumption.

For instance, let’s say at 10:00, consumer consumed two messages, then at 10:01, it consumed one message, then at 10:03, it consumed four messages, I would like to find the metrics that will show 2-1-4, and be able to plot it (in grafana for instance).

I went to look for such metrics, and there are couples, which is a bit confusing.

kafka_consumer_fetch_manager_records_per_request_avg -> The average number of records per request.

kafka_consumer_fetch_manager_records_consumed_rate -> The average number of records consumed per second.

kafka_consumer_request_rate -> Average number of requests received per second.

kafka_consumer_fetch_manager_fetch_rate -> The number of fetch requests per second.

And maybe a metric I have not listed.

May I ask what is the most appropriate metrics for me to know the throughput of my conusmer app?
I.e. to answer to this plain English question “How many messages am I consuming per second?”

Read more here: Source link