Class KafkaShareGroupFailureHandler

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

public class KafkaShareGroupFailureHandler extends Object implements KafkaFailureHandler
Failure handler for Kafka Share Group consumers that determines the appropriate acknowledgment type based on the provided metadata and acknowledges the message accordingly.
  • Constructor Details

    • KafkaShareGroupFailureHandler

      public KafkaShareGroupFailureHandler(KafkaShareConsumer<?,?> consumer, org.apache.kafka.clients.consumer.AcknowledgeType defaultAckType)
  • 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.