Kafka consumer errorhandling wrapper
Skill kjuhwa/skills-hub/skills/backend/kafka-consumer-errorhandling-wrapper
Self-correcting knowledge corpus for Claude Code — 9 stable shape clusters, bias-correction pipeline baked into contribution flow. 47 papers, 45 techniques, 1.1k skills.
npx -y skills add kjuhwa/skills-hub --skill kafka-consumer-errorhandling-wrapperAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Wrap key/value deserializers in Spring Kafka's ErrorHandlingDeserializer so a single poison record doesn't halt the consumer
SKILL.md
1.5 KB, as published. Nobody here has run it
kafka-consumer-errorhandling-wrapper
Rule
Never set KafkaAvroDeserializer directly as the consumer's deserializer. Always wrap
with ErrorHandlingDeserializer so a bad record becomes a logged failure instead of
a stuck partition.
Shape
cfg.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, ErrorHandlingDeserializer.class);
cfg.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, ErrorHandlingDeserializer.class);
cfg.put(ErrorHandlingDeserializer.KEY_DESERIALIZER_CLASS, StringDeserializer.class);
cfg.put(ErrorHandlingDeserializer.VALUE_DESERIALIZER_CLASS, KafkaAvroDeserializer.class);
cfg.put(KafkaAvroDeserializerConfig.SPECIFIC_AVRO_READER_CONFIG, true);
Pair with
DefaultErrorHandler+ DLT (DeadLetterPublishingRecoverer) so poison records are observable, not silently dropped.SeekToCurrentErrorHandleronly for retryable errors — deserialization failures are not retryable.
Not suitable when
- You rely on the consumer failing fast on schema drift — then don't wrap; instead gate at the schema-registry compatibility setting.