Odyldzhon Toshbekov created KAFKA-8194:
------------------------------------------

             Summary: MessagesInPerSec incorrect value when Stream produce 
messages
                 Key: KAFKA-8194
                 URL: https://issues.apache.org/jira/browse/KAFKA-8194
             Project: Kafka
          Issue Type: Bug
          Components: metrics
    Affects Versions: 2.2.0, 1.1.0
            Reporter: Odyldzhon Toshbekov
         Attachments: Screen Shot 2019-04-05 at 17.51.03.png, Screen Shot 
2019-04-05 at 17.52.22.png

Looks like metric
{code:java}kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec{code}
has incorrect value when messages come via Kafka Stream API.

I noticed that offset for every message from Kafka Stream can be increased by 
1,2,... However if messages come to Broker from Kafka producer it's always 
incremented by 1.

Unfortunately the metric mentioned above calculated based on offset changes and 
as result we cannot use streams because metric will be always incorrect.

For Kafka 2.2.0

!Screen Shot 2019-04-05 at 17.51.03.png!  
https://github.com/apache/kafka/blob/2.2.0/core/src/main/scala/kafka/server/ReplicaManager.scala

And this is the method used to get "numAppendedMessages"
 !Screen Shot 2019-04-05 at 17.52.22.png! 





--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to