Interface MessageBatchRecoverer

  • All Superinterfaces:
    MessageRecoverer
    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 MessageBatchRecoverer
    extends MessageRecoverer
    A retry recoverer for use with a batch listener. Users should consider throwing an exception containing the index within the batch where the exception occurred, allowing the recoverer to properly recover the remaining records.
    Since:
    2.2
    Author:
    Gary Russell
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void recover​(java.util.List<Message> messages, java.lang.Throwable cause)
      Callback for message batch that was consumed but failed all retry attempts.
      default void recover​(Message message, java.lang.Throwable cause)
      Callback for message that was consumed but failed all retry attempts.
    • Method Detail

      • recover

        default void recover​(Message message,
                             java.lang.Throwable cause)
        Description copied from interface: MessageRecoverer
        Callback for message that was consumed but failed all retry attempts.
        Specified by:
        recover in interface MessageRecoverer
        Parameters:
        message - the message to recover
        cause - the cause of the error
      • recover

        void recover​(java.util.List<Message> messages,
                     java.lang.Throwable cause)
        Callback for message batch that was consumed but failed all retry attempts.
        Parameters:
        messages - the messages to recover
        cause - the cause of the error