Interface AsyncMessageListener<T>

Type Parameters:
T - the Message payload type.
All Known Implementing Classes:
AsyncMessagingMessageListenerAdapter
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 interface AsyncMessageListener<T>
Async listener to process individual Message instances.
Since:
3.0
Author:
Tomaz Fernandes
  • Method Details

    • onMessage

      CompletableFuture<Void> onMessage(Message<T> message)
      Process the provided message.
      Parameters:
      message - the message.
      Returns:
      a completable future.
    • onMessage

      default CompletableFuture<Void> onMessage(Collection<Message<T>> messages)
      Process the provided messages.
      Parameters:
      messages - the messages.
      Returns:
      a completable future.