Class KeyValueFromKafkaRecordExtractor

java.lang.Object
io.smallrye.reactive.messaging.kafka.converters.KeyValueFromKafkaRecordExtractor
All Implemented Interfaces:
io.smallrye.reactive.messaging.keyed.KeyValueExtractor, jakarta.enterprise.inject.spi.Prioritized

@ApplicationScoped public class KeyValueFromKafkaRecordExtractor extends Object implements io.smallrye.reactive.messaging.keyed.KeyValueExtractor
Key/Value extractor extracting the key from a Kafka record and passing the record's value as value. This extractor has the default priority (KeyValueExtractor.DEFAULT_PRIORITY).
  • Field Summary

    Fields inherited from interface io.smallrye.reactive.messaging.keyed.KeyValueExtractor

    DEFAULT_PRIORITY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canExtract(org.eclipse.microprofile.reactive.messaging.Message<?> message, Type keyType, Type valueType)
     
    extractKey(org.eclipse.microprofile.reactive.messaging.Message<?> message, Type keyType)
     
    extractValue(org.eclipse.microprofile.reactive.messaging.Message<?> message, Type valueType)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.smallrye.reactive.messaging.keyed.KeyValueExtractor

    getPriority
  • Constructor Details

    • KeyValueFromKafkaRecordExtractor

      public KeyValueFromKafkaRecordExtractor()
  • Method Details

    • canExtract

      public boolean canExtract(org.eclipse.microprofile.reactive.messaging.Message<?> message, Type keyType, Type valueType)
      Specified by:
      canExtract in interface io.smallrye.reactive.messaging.keyed.KeyValueExtractor
    • extractKey

      public Object extractKey(org.eclipse.microprofile.reactive.messaging.Message<?> message, Type keyType)
      Specified by:
      extractKey in interface io.smallrye.reactive.messaging.keyed.KeyValueExtractor
    • extractValue

      public Object extractValue(org.eclipse.microprofile.reactive.messaging.Message<?> message, Type valueType)
      Specified by:
      extractValue in interface io.smallrye.reactive.messaging.keyed.KeyValueExtractor