kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diego Alvarez Zuluaga <diego.alvarez.zulu...@gmail.com>
Subject How to tell if producer is producing messages to server?
Date Fri, 27 Nov 2015 00:54:14 GMT
Hi

Using 0.8.2

I'm making a service status check and I want to include a kafka producer
check.

I was trying to use the kafka producer metrics
https://github.com/apache/kafka/blob/0.8.2/clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java#L74
and I was planning to schedule a message every 3-5 min to het the producer
metrics and look for metric *record-error-rate* to see if it's > 0.

During my tests, I'm blocking (iptables) producer from server, but every
time the value that I get is *0*, the only think that I'm seeing different
from the metrics is the *requests-in-flight* that moves from 0 to 5, but I
don't know if that's a good measure to know if the producer can talk to the
server.

After some minutes of producer cant talk to the server, I started receiving
this messages in the log:
```
2015-11-26 23:18:29,302 DEBUG [o.apache.kafka.clients.NetworkClient] [] -
Trying to send metadata request to node 2
```
but now the metric  *requests-in-flight *returned 0.

So, how can I tell from the producer side if it's sending messages to kafka
producer? is there any exposed API for that? is there any other metric?

Thank you.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message