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 -
Method Summary
Modifier and TypeMethodDescriptionbooleancanExtract(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, waitMethods 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:
canExtractin interfaceio.smallrye.reactive.messaging.keyed.KeyValueExtractor
-
extractKey
public Object extractKey(org.eclipse.microprofile.reactive.messaging.Message<?> message, Type keyType) - Specified by:
extractKeyin interfaceio.smallrye.reactive.messaging.keyed.KeyValueExtractor
-
extractValue
public Object extractValue(org.eclipse.microprofile.reactive.messaging.Message<?> message, Type valueType) - Specified by:
extractValuein interfaceio.smallrye.reactive.messaging.keyed.KeyValueExtractor
-