Example usage for org.springframework.kafka.listener FailedRecordTracker FailedRecordTracker

List of usage examples for org.springframework.kafka.listener FailedRecordTracker FailedRecordTracker

Introduction

In this page you can find the example usage for org.springframework.kafka.listener FailedRecordTracker FailedRecordTracker.

Prototype

FailedRecordTracker(@Nullable BiConsumer<ConsumerRecord<?, ?>, Exception> recoverer, int maxFailures,
            LogAccessor logger) 

Source Link

Usage

From source file:org.springframework.kafka.listener.DefaultAfterRollbackProcessor.java

/**
 * Construct an instance with the provided recoverer which will be called after
 * maxFailures have occurred for a topic/partition/offset.
 * @param recoverer the recoverer; if null, the default (logging) recoverer is used.
 * @param maxFailures the maxFailures; a negative value is treated as infinity.
 * @since 2.2//from w w w  .  ja  v  a  2  s.co m
 */
public DefaultAfterRollbackProcessor(@Nullable BiConsumer<ConsumerRecord<?, ?>, Exception> recoverer,
        int maxFailures) {
    this.failureTracker = new FailedRecordTracker(recoverer, maxFailures, logger);
}

From source file:org.springframework.kafka.listener.SeekToCurrentErrorHandler.java

/**
 * Construct an instance with the provided recoverer which will be called after
 * maxFailures have occurred for a topic/partition/offset.
 * @param recoverer the recoverer; if null, the default (logging) recoverer is used.
 * @param maxFailures the maxFailures; a negative value is treated as infinity.
 * @since 2.2//  www. ja v a  2  s.  c om
 */
public SeekToCurrentErrorHandler(@Nullable BiConsumer<ConsumerRecord<?, ?>, Exception> recoverer,
        int maxFailures) {
    this.failureTracker = new FailedRecordTracker(recoverer, maxFailures, logger);
}