public interface ConsumerRecordProcessor
Channel.run(ConsumerRecordProcessor, List) )} method invokes the
processCallback(ConsumerRecords, String) method to deliver the consumed records to
the user for further processing.| Modifier and Type | Method and Description |
|---|---|
boolean |
processCallback(ConsumerRecords consumerRecords,
java.lang.String consumerId)
Method to be implemented by the receiver of the consumed records.
|
boolean processCallback(ConsumerRecords consumerRecords, java.lang.String consumerId) throws ConsumerError, PermanentError
consumerRecords - instance of ConsumerRecords. It contains the consumed records returned by
Channel.consume() method.consumerId - consumer identifierChannel.run(ConsumerRecordProcessor, List) )} method
currently ignores this return value.ConsumerError - if receiver wants to retry consuming records since last committed offset. Receiver should
raise this exception upon finding errors in consumer records that might be overcome by
consuming such records again.PermanentError - if receiver wants to stop consuming records without even committing the last consumed
ones. Receiver should raise this exception upon finding unrecoverable errors in consumer
records.