How does (should) Kafka Consumer cope with Poison Messages

寵の児 提交于 2019-12-22 05:37:10

问题


When a Kafka Consumer fails to deserialize a message, is it the client applications responsibility to deal with the Poison Message?

Or

Does Kafka "increment" the message offset and continue consumption of valid messages?

Is there a "Best Practice" for dealing with Poison Messages held on Kafka topics?


回答1:


When Kafka is unable to deserialize the record the consumer will receive a org.apache.kafka.common.KafkaException, you should commit the offset yourself and keep consuming.



来源:https://stackoverflow.com/questions/35991849/how-does-should-kafka-consumer-cope-with-poison-messages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!