Class KafkaDelayedRetryTopic

java.lang.Object
io.smallrye.reactive.messaging.kafka.commit.ContextHolder
io.smallrye.reactive.messaging.kafka.fault.KafkaDelayedRetryTopic
All Implemented Interfaces:
KafkaFailureHandler

public class KafkaDelayedRetryTopic extends ContextHolder implements KafkaFailureHandler
  • Field Details

  • Constructor Details

  • Method Details

    • getRetryTopic

      public static String getRetryTopic(String topic, int delayMillis)
    • retryStream

      public io.smallrye.mutiny.Multi<? extends IncomingKafkaRecord<?,?>> retryStream()
    • 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
    • getNextTopic

      public static String getNextTopic(List<String> topics, String deadQueueTopic, int maxRetries, int retryCount)
    • getRetryHeader

      public static int getRetryHeader(org.apache.kafka.common.header.Headers headers)