Interface PulsarMessageRecoverer<T>

Type Parameters:
T - payload type of Pulsar message.
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 PulsarMessageRecoverer<T>
Allows recovering a failed Pulsar message. Implementations can choose how the message needs to be recovered by providing a Function implementation that takes a Consumer and then provide a BiConsumer which takes Message and the thrown Exception.
Author:
Soby Chacko, Chris Bono
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    recoverMessage(org.apache.pulsar.client.api.Message<T> message, Exception exception)
    Recover a failed message, for e.g.
  • Method Details

    • recoverMessage

      void recoverMessage(org.apache.pulsar.client.api.Message<T> message, Exception exception)
      Recover a failed message, for e.g. send the message to a DLT.
      Parameters:
      message - Pulsar message
      exception - exception from failed message