Yevhen Tsyba created KAFKA-7522: ----------------------------------- Summary: As a client of kafka-streams library I want to provide custom error handlers programmatically Key: KAFKA-7522 URL: https://issues.apache.org/jira/browse/KAFKA-7522 Project: Kafka Issue Type: Improvement Components: streams Affects Versions: 1.1.0 Reporter: Yevhen Tsyba
According to [KIP-210|https://cwiki.apache.org/confluence/display/KAFKA/KIP-210+-+Provide+for+custom+error+handling++when+Kafka+Streams+fails+to+produce] and [KIP-161|https://cwiki.apache.org/confluence/display/KAFKA/KIP-161%3A+streams+deserialization+exception+handlers], I can define custom error handlers via properties: {code:java} default.deserialization.exception.handler=org.apache.kafka.streams.errors .LogAndContinueExceptionHandler default.production.exception.handler=org.apache.kafka.streams.errors .ProductionExceptionHandler or settings.put(StreamsConfig.DEFAULT_PRODUCTION_EXCEPTION_HANDLER_CLASS_CONFIG, ProductionExceptionHandler.class); {code} Nevertheless, this solution has some limitations. For example, I have a spring-based application, where my custom error handler is a bean. Then I want to add micrometer monitoring to my error handler. The existed approach doesn't allow me to do it, because class creates outside of spring context. I think it would be better to have such a possibility to do so. -- This message was sent by Atlassian JIRA (v7.6.3#76005)