I have a custom Decoder for my messages (Thrift). I want to be able to handle "bad" messages that I can't decode. When the ConsumerIterator encounters a bad message, the exception thrown by my Decoder bubbles up and I can catch it and handle it. Subsequent calls to the ConsumerIterator give me IllegalStateException: "Iterator is in failed state" however.
What is the preferred way to handle messages that my custom Decoder can't decode, and then continue consuming messages? It doesn't sound reasonable to me that one bad message causes the whole consumer to fall over. Kafka version: 0.8.0 Stacktrace: java.lang.IllegalStateException: Iterator is in failed state at kafka.utils.IteratorTemplate.hasNext(Unknown Source) ~[kafka_2.10-0.8.0.jar:0.8.0]