Interface AckAwareHandler<T>

Type Parameters:
T - decoded payload type
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 AckAwareHandler<T>
Handles one message and states the outcome explicitly.

Preferable to MessageHandler when the decision is data rather than an error: a handler that wants to retry after a broker-supplied delay, or to dead-letter with a reason without manufacturing an exception, says so directly.

  • Method Summary

    Modifier and Type
    Method
    Description
    handle(Message<T> message)
     
  • Method Details

    • handle

      Ack handle(Message<T> message)
      Parameters:
      message - the delivery to handle
      Returns:
      what should happen to the delivery; must not be null