Re: How to get past "bad" Kafka message, restart, keep state

2018-06-20 Thread Tzu-Li (Gordon) Tai
Hi, You can “skip” the corrupted message by returning `null` from the deserialize method on the user-provided DeserializationSchema. This lets the Kafka connector consider the record as processed, advances the offset, but doesn’t emit anything downstream for it. Hope this helps! Cheers, Gordon

Re: How to get past "bad" Kafka message, restart, keep state

2018-06-20 Thread Kien Truong
Hi, You can use FlatMap instead of Map, and only collect valid elements. Regards, Kien On 6/20/2018 7:57 AM, chrisr123 wrote: First time I'm trying to get this to work so bear with me. I'm trying to learn checkpointing with Kafka and handling "bad" messages, restarting without losing state.

How to get past "bad" Kafka message, restart, keep state

2018-06-19 Thread chrisr123
First time I'm trying to get this to work so bear with me. I'm trying to learn checkpointing with Kafka and handling "bad" messages, restarting without losing state. Use Case: Use checkpointing. Read a stream of integers from Kafka, keep a running sum. If a "bad" Kafka message read, restart app, s