Re: FlinkKafkaProducer010: why is checkErroneous() at the beginning of the invoke() method

2019-04-12 Thread Chesnay Schepler
It is called at the top since exceptions can occur asynchronously when invoke() already exited. In this case the only place you can fail is if the next record is being processed. On 12/04/2019 11:00, Kumar Bolar, Harshith wrote: Hi all, I had a requirement to handle Kafka producer exceptions

FlinkKafkaProducer010: why is checkErroneous() at the beginning of the invoke() method

2019-04-12 Thread Kumar Bolar, Harshith
Hi all, I had a requirement to handle Kafka producer exceptions so that they don’t bring down the job. I extended FlinkKafkaProducer010 and handled the exceptions there. public void invoke(T value, Context context) throws Exception { try { this.checkErroneous();