Interface AsyncErrorHandler<T>

Type Parameters:
T - the Message payload type.

public interface AsyncErrorHandler<T>
Interface for handling message processing errors async. If the error handler completes normally, the message or messages will be considered recovered for further processing purposes. If the message should not be considered recovered, an exception must be returned from the error handler.
Since:
3.0
Author:
Tomaz Fernandes
  • Method Details

    • handle

      default CompletableFuture<Void> handle(Message<T> message, Throwable t)
      Asynchronously handle the errors thrown processing the given Message.
      Parameters:
      message - the message.
      t - the thrown exception.
      Returns:
      a completable future.
    • handle

      default CompletableFuture<Void> handle(Collection<Message<T>> messages, Throwable t)
      Asynchronously handle the errors thrown processing the given Message instances.
      Parameters:
      messages - the messages.
      t - the thrown exception.
      Returns:
      a completable future.