Package org.voltdb.stream.api.kafka
Class KafkaStreamSinkConfigurator<T>
java.lang.Object
org.voltdb.stream.api.kafka.KafkaStreamSinkConfigurator<T>
- All Implemented Interfaces:
OperatorConfigurator
,VoltStreamSinkConfigurator<T>
this configurator can be autoconfigured using helm's values under streaming.pipeline.configuration.
By default, source configuration is lookup by `kafka.sink` config path, for example:
kafka: sink: topicName: topicA bootstrapServers: serverA,serverB # optional startingOffset: EARLIEST [LATEST | NONE] pollTimeout: PT0.25S maxCommitTimeout: PT10S maxCommitRetries: 3 properties: key1: value1 key2: value2
-
Method Summary
Modifier and TypeMethodDescriptionstatic <P> KafkaStreamSinkConfigurator
<P> configures the configurator using custom config path.withBootstrapServers
(String bootstrapServers) withExceptionHandler
(ExceptionHandler exceptionHandler) withHeaders
(Function<T, Iterable<org.apache.kafka.common.header.Header>> extractorFunction) withKeyExtractor
(Function<T, Long> extractorFunction) withKeyExtractor
(Function<T, K> extractorFunction, Class<? extends org.apache.kafka.common.serialization.Serializer<K>> serializerClass) withProperty
(String key, boolean value) withProperty
(String key, int value) withProperty
(String key, long value) withProperty
(String key, String value) withSchemaRegistry
(String schemaRegistryUrl) withSSL
(KafkaStreamSslConfiguration sslConfigurator) withTopicName
(String topicName) withValueExtractor
(Function<T, K> extractorFunction, Class<? extends org.apache.kafka.common.serialization.Serializer<?>> serializerClass) withValueSerializer
(Class<? extends org.apache.kafka.common.serialization.Serializer<?>> serializerClass) withValueSerializer
(String serializerClass) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.voltdb.stream.api.extension.OperatorConfigurator
configure, getConfiguration
-
Method Details
-
accepting
-
withTopicName
-
withBootstrapServers
-
withSSL
-
withProperty
-
withProperty
-
withProperty
-
withProperty
-
withValueSerializer
public KafkaStreamSinkConfigurator<T> withValueSerializer(Class<? extends org.apache.kafka.common.serialization.Serializer<?>> serializerClass) -
withValueSerializer
-
withKeyExtractor
-
withKeyExtractor
public <K> KafkaStreamSinkConfigurator<T> withKeyExtractor(Function<T, K> extractorFunction, Class<? extends org.apache.kafka.common.serialization.Serializer<K>> serializerClass) -
withValueExtractor
public <K> KafkaStreamSinkConfigurator<T> withValueExtractor(Function<T, K> extractorFunction, Class<? extends org.apache.kafka.common.serialization.Serializer<?>> serializerClass) -
withHeaders
public <K> KafkaStreamSinkConfigurator<T> withHeaders(Function<T, Iterable<org.apache.kafka.common.header.Header>> extractorFunction) -
withSchemaRegistry
-
withExceptionHandler
-
getExceptionHandler
-
configure
configures the configurator using custom config path. for example having a yaml filemy: custom: sink: kafka: key: A,B,C other: key: value
a path is "my.custom.sink.kafka", this will return a map of keys and values. the default path is "kafka.sink" Note for more info see helm configuration under streaming.pipeline.configuration.kafka.sink- Parameters:
path
- to a config- Returns:
- kafka configurator
-