Re: Handling un-decodable messages (Kafka 0.8.0)

2014-06-10 Thread Tom Brown
Another way would be to have your custom decoder return an object that can be recognized as an error. We have a decoder that splits binary data into a series of records. If any part of the binary data is corrupt, the decoder can be configured to either throw an exception or add an "error record" t

Re: Handling un-decodable messages (Kafka 0.8.0)

2014-06-09 Thread Jun Rao
This is handled better in 0.8.1.1. In the same situation, you can resume the iteration on the next message. To do this in 0.8.0, you will have to get the binary data in ConsumerIterator and run the decoder in the consumer code. Thanks, Jun On Mon, Jun 9, 2014 at 9:40 AM, Christofer Hedbrandh w

Handling un-decodable messages (Kafka 0.8.0)

2014-06-09 Thread Christofer Hedbrandh
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 Ille