kstreamplify
kstreamplify copied to clipboard
Implement an interface for KafkaError 📛
Problem
Currently the KafkaError is an Avro object, meaning that anyone using this library needs to have a schema registry on their cluster and use it.
Suggestion
We can create an interface KafkaErrorInterface that requires getters and setters for topic, partition, offset, error stack, message, with the default implementation being the KafkaError avro POJO.
Override could be declared in the properties just like ExceptionHandlers for KafkaStreams.
Alternatives Considered
We could also create a model and their serdes for all 3 main ways of interacting with kafka (Avro, JSON & Protobuff)