Class PulsarDeadLetterPublishingRecoverer<T>
java.lang.Object
org.springframework.pulsar.listener.PulsarDeadLetterPublishingRecoverer<T>
- Type Parameters:
T
- payload type of the Pulsar message
- All Implemented Interfaces:
PulsarMessageRecovererFactory<T>
public class PulsarDeadLetterPublishingRecoverer<T>
extends Object
implements PulsarMessageRecovererFactory<T>
PulsarMessageRecoverer
implementation that is capable of recovering the message
by publishing the failed record to a DLT - Dead Letter Topic.- Author:
- Soby Chacko
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
TODO: Move this to a common constants class.protected final LogAccessor
-
Constructor Summary
ConstructorDescriptionPulsarDeadLetterPublishingRecoverer
(PulsarOperations<T> pulsarTemplate) PulsarDeadLetterPublishingRecoverer
(PulsarOperations<T> pulsarTemplate, BiFunction<org.apache.pulsar.client.api.Consumer<?>, org.apache.pulsar.client.api.Message<?>, String> destinationResolver) -
Method Summary
Modifier and TypeMethodDescriptionrecovererForConsumer
(org.apache.pulsar.client.api.Consumer<T> consumer) Provides a message recovererPulsarMessageRecoverer
.
-
Field Details
-
logger
-
EXCEPTION_THROWN_CAUSE
TODO: Move this to a common constants class. exception cause for the failed message.- See Also:
-
-
Constructor Details
-
PulsarDeadLetterPublishingRecoverer
-
PulsarDeadLetterPublishingRecoverer
public PulsarDeadLetterPublishingRecoverer(PulsarOperations<T> pulsarTemplate, BiFunction<org.apache.pulsar.client.api.Consumer<?>, org.apache.pulsar.client.api.Message<?>, String> destinationResolver)
-
-
Method Details
-
recovererForConsumer
public PulsarMessageRecoverer<T> recovererForConsumer(org.apache.pulsar.client.api.Consumer<T> consumer) Description copied from interface:PulsarMessageRecovererFactory
Provides a message recovererPulsarMessageRecoverer
.- Specified by:
recovererForConsumer
in interfacePulsarMessageRecovererFactory<T>
- Parameters:
consumer
- Pulsar consumer- Returns:
PulsarMessageRecoverer
.
-