Interface StatusListener
public interface StatusListener
Interface to listener for failure status of KafkaStore readers and writers
-
Method Summary
Modifier and TypeMethodDescriptionvoidonProduceFailure(int partition) Invoked when a record produce fails.voidonProduceSuccess(int partition) Invoked when a record is successfully producedbooleanInvoked if the consumer throws an exception while polling.voidInvoked when a record has been processed successfully by the consumer.booleanonRemoteFailure(int partition) Invoked when FAILED status record is consumed.voidonRemoteSuccess(int partition) Invoked when an INITIALIZED status record is consumed.booleanonWriterFailure(int partition) Invoked if the writer fails due to a critical error and resigns.voidonWriterSuccess(int partition) Invoked when the writer is successfully initialized.
-
Method Details
-
onReaderSuccess
void onReaderSuccess()Invoked when a record has been processed successfully by the consumer. -
onReaderFailure
boolean onReaderFailure()Invoked if the consumer throws an exception while polling. Failure is cleared on a successful poll.- Returns:
- true if retry timeout has elapsed since the first failure. If true, authorizer will be moved to failed state and all future authorization requests will be denied.
-
onWriterSuccess
void onWriterSuccess(int partition) Invoked when the writer is successfully initialized. This is also invoked to clear writer failure status when successful initialization record of a remote writer with newer generation is processed. -
onWriterFailure
boolean onWriterFailure(int partition) Invoked if the writer fails due to a critical error and resigns. Failure will be cleared after writer is re-elected and writer of a new generation completes initialization.- Parameters:
partition- Partition for which writer failed- Returns:
- true if retry timeout has elapsed since the first failure. If true, authorizer will be moved to failed state and all future authorization requests will be denied.
-
onProduceSuccess
void onProduceSuccess(int partition) Invoked when a record is successfully produced- Parameters:
partition- Partition of the record
-
onProduceFailure
void onProduceFailure(int partition) Invoked when a record produce fails.- Parameters:
partition- Partition of the record
-
onRemoteSuccess
void onRemoteSuccess(int partition) Invoked when an INITIALIZED status record is consumed.- Parameters:
partition- Partition of the record
-
onRemoteFailure
boolean onRemoteFailure(int partition) Invoked when FAILED status record is consumed. Failure is cleared when the next INITIALIZED record is processed.- Parameters:
partition- Partition of the record- Returns:
- true if retry timeout has elapsed since the first failure. If true, authorizer will be moved to failed state and all future authorization requests will be denied.
-