Class KafkaDeadLetterQueue

java.lang.Object
io.smallrye.reactive.messaging.kafka.fault.KafkaDeadLetterQueue
All Implemented Interfaces:
KafkaFailureHandler

public class KafkaDeadLetterQueue extends Object implements KafkaFailureHandler
  • Field Details

  • Constructor Details

    • KafkaDeadLetterQueue

      public KafkaDeadLetterQueue(String channel, String topic, KafkaSink dlqSink, io.smallrye.mutiny.operators.multi.processors.UnicastProcessor<org.eclipse.microprofile.reactive.messaging.Message<?>> dlqSource)
  • 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: KafkaFailureHandler
      Handle message negative-acknowledgment
      Specified by:
      handle in interface KafkaFailureHandler
      Type Parameters:
      K - type of record key
      V - type of record value
      Parameters:
      record - incoming Kafka record
      reason - nack reason
      metadata - 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: KafkaFailureHandler
      Called on channel shutdown
      Specified by:
      terminate in interface KafkaFailureHandler