Interface RabbitListenerErrorHandler

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 RabbitListenerErrorHandler
An error handler which is called when a {code @RabbitListener} method throws an exception. This is invoked higher up the stack than the listener container's error handler.
Gary Russell
  • Method Details

    • handleError

      Object handleError(Message amqpMessage, @Nullable Message<?> message, ListenerExecutionFailedException exception) throws Exception
      Handle the error. If an exception is not thrown, the return value is returned to the sender using normal replyTo/@SendTo semantics.
      amqpMessage - the raw message received.
      message - the converted spring-messaging message (if available).
      exception - the exception the listener threw, wrapped in a ListenerExecutionFailedException.
      the return value to be sent to the sender.
      Exception - an exception which may be the original or different.