StreamsErrorCollector¶
StreamsErrorCollector is a MetricCollector to record consumer failed messages metrics (per source topic).
The metrics are registered in consumer-metrics group.

Creating Instance¶
StreamsErrorCollector takes the following to be created:
StreamsErrorCollector is created using create.
Creating StreamsErrorCollector¶
StreamsErrorCollector create(
String applicationId,
MetricCollectors collectors)
create creates a StreamsErrorCollector with the given MetricCollectors.
create requests the MetricCollectors to register the StreamsErrorCollector for the applicationId.
create is used when:
QueryBuilderis requested to buildStreamsProperties (and makes theStreamsErrorCollectoravailable as ksql.internal.streams.error.collector)
Topic Sensors¶
Map<String, TopicSensors<Object>> topicSensors
StreamsErrorCollector builds sensors per topic when recordError.
consumer-failed-messages¶
consumer-failed-messages-per-sec¶
Recording Error¶
void recordError(
String topic)
recordError looks up the given topic in the topic sensors (or creates a new one) and increments the sensor.
recordError is used when:
LogMetricAndContinueExceptionHandleris requested to handle a deserialization exception
buildSensors¶
TopicSensors<Object> buildSensors(
String topic)