Class KafkaDeadLetterQueue
java.lang.Object
io.smallrye.reactive.messaging.kafka.fault.KafkaDeadLetterQueue
- All Implemented Interfaces:
KafkaFailureHandler
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.smallrye.reactive.messaging.kafka.fault.KafkaFailureHandler
KafkaFailureHandler.Strategy -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionKafkaDeadLetterQueue(String channel, String topic, KafkaProducer producer, BiConsumer<Throwable, Boolean> reportFailure) -
Method Summary
Modifier and TypeMethodDescription<K,V> io.smallrye.mutiny.Uni<Void> handle(IncomingKafkaRecord<K, V> record, Throwable reason, org.eclipse.microprofile.reactive.messaging.Metadata metadata) Handle message negative-acknowledgmentvoidCalled on channel shutdown
-
Field Details
-
DEAD_LETTER_EXCEPTION_CLASS_NAME
- See Also:
-
DEAD_LETTER_CAUSE_CLASS_NAME
- See Also:
-
DEAD_LETTER_REASON
- See Also:
-
DEAD_LETTER_CAUSE
- See Also:
-
DEAD_LETTER_TOPIC
- See Also:
-
DEAD_LETTER_OFFSET
- See Also:
-
DEAD_LETTER_PARTITION
- See Also:
-
-
Constructor Details
-
KafkaDeadLetterQueue
public KafkaDeadLetterQueue(String channel, String topic, KafkaProducer producer, BiConsumer<Throwable, Boolean> reportFailure)
-
-
Method Details
-
handle
public <K,V> io.smallrye.mutiny.Uni<Void> handle(IncomingKafkaRecord<K, V> record, Throwable reason, org.eclipse.microprofile.reactive.messaging.Metadata metadata) Description copied from interface:KafkaFailureHandlerHandle message negative-acknowledgment- Specified by:
handlein interfaceKafkaFailureHandler- Type Parameters:
K- type of record keyV- type of record value- Parameters:
record- incoming Kafka recordreason- nack reasonmetadata- associated metadata with negative-acknowledgment- Returns:
- a completion stage completed when the message is negative-acknowledgement has completed.
-
terminate
public void terminate()Description copied from interface:KafkaFailureHandlerCalled on channel shutdown- Specified by:
terminatein interfaceKafkaFailureHandler
-