Interface AcknowledgerConsumerWorker.AcknowledgementFailureHandler
- Enclosing class:
AcknowledgerConsumerWorker<T extends Acknowledgeable>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public static interface AcknowledgerConsumerWorker.AcknowledgementFailureHandler
Allows the user to customize the behavior of the worker when an acknowledgement fails.
-
Method Summary
-
Method Details
-
onAckFailure
Called when anackfails. If the user wants the task to continue, then they should simply return. If the user wants the task to fail, then they should throw aThrowable, either the given one or a new one.The underlying implementation handles
InterruptedExceptionandErrorinstances for correctness, so those causes cannot be intercepted. Also, as a rule, users should not throw these types from this method.- Parameters:
t- the failure cause- Throws:
Throwable- the failure cause, if the user wants the task to fail
-