public interface ErrantRecordReporter
SinkTask.put(java.util.Collection). Reporter of problematic records and the corresponding problems.
reportReport a problematic record and the corresponding error to be written to the sink connector's dead letter queue (DLQ).
This call is asynchronous and returns a
get()on this future will block until the record has been written or throw any exception that occurred while sending the record. If you want to simulate a simple blocking call you can call the
get()method immediately. Connect guarantees that sink records reported through this reporter will be written to the error topic before the framework calls the
SinkTask.preCommit(java.util.Map)method and therefore before committing the consumer offsets. SinkTask implementations can use the Future when stronger guarantees are required.
record- the problematic record; may not be null
error- the error capturing the problem with the record; may not be null
- a future that can be used to block until the record and error are reported to the DLQ
ConnectException- if the error reporter and DLQ fails to write a reported record