This repository has been archived by the owner on Oct 10, 2023. It is now read-only.
ProducerMetricsInterceptor fails with IllegalStateException and/or IllegalAccessException #194
Labels
bug
Something isn't working
Issue Description
When producing messages, the following exception is sometimes seen in the Kafka pod logs:
This problem is caused by the java thread that removes metrics from the ArrayBlockingQueue to terminate after receiving an exception. When the thread terminates, the queue is not emptied and the result is that all produce messages will receive the exception above. The exception has a significant impact on the performance of the produce messages and will prevent further producer metrics from being captured.
The problem is also sometimes seen in conjunction with an
IllegalAccessException
trying to set afinal
field through reflection. This happens when the producer acks are set to 0 or 1. Once theIllegalAccessException
has occurred, it will be followed by theIllegalStateException
s.Once the queue is full, the only way to restore the system back to normal service is to delete the Kafka pods that contain the exceptions and allow a fresh pod to be started.
Environment
The text was updated successfully, but these errors were encountered: