public final class StreamsConfigBuilder extends AbstractConfigBuilder<StreamsConfigBuilder>
props| Modifier and Type | Method and Description |
|---|---|
static StreamsConfigBuilder |
create() |
StreamsConfigBuilder |
withAcceptableRecoveryLag(long acceptableRecoveryLag)
The maximum acceptable lag (number of offsets to catch up) for a client to be considered caught-up for an active task.
|
StreamsConfigBuilder |
withApplicationId(String applicationId)
An identifier for the stream processing application.
|
StreamsConfigBuilder |
withApplicationServer(String applicationServer)
A host:port pair pointing to an embedded user defined endpoint that can be used for discovering the locations of state stores within a single KafkaStreams application
|
StreamsConfigBuilder |
withBufferedRecordsPerPartition(int bufferedRecordsPerPartition)
Maximum number of records to buffer per partition.
|
StreamsConfigBuilder |
withCacheMaxBytesBuffering(long cacheMaxBytesBuffering)
Maximum number of memory bytes to be used for buffering across all threads
|
StreamsConfigBuilder |
withClientId(String clientId)
An ID prefix string used for the client IDs of internal consumer, producer and restore-consumer,
with pattern '
|
StreamsConfigBuilder |
withCommitInterval(Duration commitInterval)
The frequency with which to save the position of the processor.
|
StreamsConfigBuilder |
withDefaultDeserializationExceptionHandler(Class<? extends org.apache.kafka.streams.errors.DeserializationExceptionHandler> defaultDeserializationExceptionHandler)
Exception handling class that implements the
org.apache.kafka.streams.errors.DeserializationExceptionHandler interface. |
StreamsConfigBuilder |
withDefaultKeySerde(Class<? extends org.apache.kafka.common.serialization.Serde<?>> defaultKeySerde)
Default serializer / deserializer class for key that implements the
org.apache.kafka.common.serialization.Serde interface. |
StreamsConfigBuilder |
withDefaultProductionExceptionHandler(Class<? extends org.apache.kafka.streams.errors.ProductionExceptionHandler> defaultProductionExceptionHandler)
Exception handling class that implements the
org.apache.kafka.streams.errors.ProductionExceptionHandler interface. |
StreamsConfigBuilder |
withDefaultTimestampExtractor(Class<? extends org.apache.kafka.streams.processor.TimestampExtractor> defaultTimestampExtractor)
Default timestamp extractor class that implements the
org.apache.kafka.streams.processor.TimestampExtractor interface. |
StreamsConfigBuilder |
withDefaultValueSerde(Class<? extends org.apache.kafka.common.serialization.Serde<?>> defaultValueSerde)
Default serializer / deserializer class for value that implements the
org.apache.kafka.common.serialization.Serde interface. |
StreamsConfigBuilder |
withMaxTaskIdle(Duration maxTaskIdle)
Maximum amount of time a stream task will stay idle when not all of its partition buffers contain records,
to avoid potential out-of-order record processing across multiple input streams.
|
StreamsConfigBuilder |
withMaxWarmupReplicas(int maxWarmupReplicas)
The maximum number of warmup replicas (extra standbys beyond the configured num.standbys) that can be assigned at once for the purpose of keeping
the task available on one instance while it is warming up on another instance it has been reassigned to.
|
StreamsConfigBuilder |
withNumStandbyReplicas(int numStandbyReplicas)
The number of standby replicas for each task.
|
StreamsConfigBuilder |
withNumStreamThreads(int numStreamThreads)
The number of threads to execute stream processing.
|
StreamsConfigBuilder |
withPartitionGrouper(Class<? extends org.apache.kafka.streams.processor.PartitionGrouper> partitionGrouper)
Deprecated.
|
StreamsConfigBuilder |
withPoll(Duration poll)
The amount of time to block waiting for input.
|
StreamsConfigBuilder |
withProbingRebalanceInterval(Duration probingRebalanceInterval)
The maximum time to wait before triggering a rebalance to probe for warmup replicas that have finished warming up and are ready to become active.
|
StreamsConfigBuilder |
withProcessingGuarantee(ProcessingGuarantee processingGuarantee)
The processing guarantee that should be used.
|
StreamsConfigBuilder |
withReplicationFactor(int replicationFactor)
The replication factor for change log topics and repartition topics created by the stream processing application.
|
StreamsConfigBuilder |
withRocksDBConfigSetter(Class<? extends org.apache.kafka.streams.state.RocksDBConfigSetter> rocksDBConfigSetter)
A Rocks DB config setter class or class name that implements the
org.apache.kafka.streams.state.RocksDBConfigSetter interface |
StreamsConfigBuilder |
withStateCleanupDelay(Duration stateCleanupDelay)
The amount of time in milliseconds to wait before deleting state when a partition has migrated.
|
StreamsConfigBuilder |
withStateDir(Path stateDir)
The replication factor for change log topics and repartition topics created by the stream processing application.
|
StreamsConfigBuilder |
withTopologyOptimization(TopologyOptimization topologyOptimization)
A configuration telling Kafka Streams if it should optimize the topology, disabled by default
|
StreamsConfigBuilder |
withUpgradeFrom(UpgradeFrom upgradeFrom)
Allows upgrading from versions 0.10.0/0.10.1/0.10.2/0.11.0/1.0/1.1 to version 1.2 (or newer) in a backward compatible way.
|
StreamsConfigBuilder |
withWindowStoreChangeLogAdditionalRetention(Duration windowStoreChangeLogAdditionalRetention)
Added to a windows maintainMs to ensure data is not deleted from the log prematurely.
|
buildMap, buildProperties, withBootstrapServers, withBootstrapServers, withClientDNSLookup, withClientRack, withConnectionsMaxIdle, withCustom, withCustomMap, withMetadataMaxAge, withMetricReporterClasses, withMetricsNumSamples, withMetricsRecordingLevel, withMetricsSampleWindow, withReceiveBufferBytes, withReconnectBackoff, withReconnectBackoffMax, withRequestTimeout, withRetryBackoff, withSaslMechanism, withSecurityProtocol, withSecurityProviders, withSendBufferBytes, withSocketConnectionSetupTimeout, withSocketConnectionSetupTimeoutMaxpublic static StreamsConfigBuilder create()
public StreamsConfigBuilder withApplicationId(String applicationId)
public StreamsConfigBuilder withReplicationFactor(int replicationFactor)
public StreamsConfigBuilder withStateDir(Path stateDir)
public StreamsConfigBuilder withCacheMaxBytesBuffering(long cacheMaxBytesBuffering)
public StreamsConfigBuilder withClientId(String clientId)
withClientId in class AbstractConfigBuilder<StreamsConfigBuilder>public StreamsConfigBuilder withDefaultDeserializationExceptionHandler(Class<? extends org.apache.kafka.streams.errors.DeserializationExceptionHandler> defaultDeserializationExceptionHandler)
org.apache.kafka.streams.errors.DeserializationExceptionHandler interface.public StreamsConfigBuilder withDefaultKeySerde(Class<? extends org.apache.kafka.common.serialization.Serde<?>> defaultKeySerde)
org.apache.kafka.common.serialization.Serde interface.
Note when windowed serde class is used, one needs to set the inner serde class that implements the org.apache.kafka.common.serialization.Serde interface via
DEFAULT_WINDOWED_KEY_SERDE_INNER_CLASS or DEFAULT_WINDOWED_VALUE_SERDE_INNER_CLASS as wellpublic StreamsConfigBuilder withDefaultValueSerde(Class<? extends org.apache.kafka.common.serialization.Serde<?>> defaultValueSerde)
org.apache.kafka.common.serialization.Serde interface.
Note when windowed serde class is used, one needs to set the inner serde class that implements the org.apache.kafka.common.serialization.Serde interface via
DEFAULT_WINDOWED_KEY_SERDE_INNER_CLASS or DEFAULT_WINDOWED_VALUE_SERDE_INNER_CLASS as wellpublic StreamsConfigBuilder withDefaultProductionExceptionHandler(Class<? extends org.apache.kafka.streams.errors.ProductionExceptionHandler> defaultProductionExceptionHandler)
org.apache.kafka.streams.errors.ProductionExceptionHandler interface.public StreamsConfigBuilder withDefaultTimestampExtractor(Class<? extends org.apache.kafka.streams.processor.TimestampExtractor> defaultTimestampExtractor)
org.apache.kafka.streams.processor.TimestampExtractor interface.public StreamsConfigBuilder withNumStandbyReplicas(int numStandbyReplicas)
public StreamsConfigBuilder withNumStreamThreads(int numStreamThreads)
public StreamsConfigBuilder withMaxTaskIdle(Duration maxTaskIdle)
public StreamsConfigBuilder withProcessingGuarantee(ProcessingGuarantee processingGuarantee)
AT_LEAST_ONCE (default) and EXACTLY_ONCE.
Note that exactly-once processing requires a cluster of at least three brokers by default what is the recommended setting for production; for development you can change this, by adjusting broker setting
transaction.state.log.replication.factor and transaction.state.log.min.isr.public StreamsConfigBuilder withTopologyOptimization(TopologyOptimization topologyOptimization)
public StreamsConfigBuilder withApplicationServer(String applicationServer)
public StreamsConfigBuilder withBufferedRecordsPerPartition(int bufferedRecordsPerPartition)
public StreamsConfigBuilder withCommitInterval(Duration commitInterval)
processing.guarantee is set to EXACTLY_ONCE, the default value is EOS_DEFAULT_COMMIT_INTERVAL_MS,
otherwise the default value is DEFAULT_COMMIT_INTERVAL_MS".@Deprecated public StreamsConfigBuilder withPartitionGrouper(Class<? extends org.apache.kafka.streams.processor.PartitionGrouper> partitionGrouper)
org.apache.kafka.streams.processor.PartitionGrouper interface."
WARNING: This config is deprecated and will be removed in 3.0.0 release.public StreamsConfigBuilder withPoll(Duration poll)
public StreamsConfigBuilder withRocksDBConfigSetter(Class<? extends org.apache.kafka.streams.state.RocksDBConfigSetter> rocksDBConfigSetter)
org.apache.kafka.streams.state.RocksDBConfigSetter interfacepublic StreamsConfigBuilder withStateCleanupDelay(Duration stateCleanupDelay)
state.cleanup.delay.ms will be removedpublic StreamsConfigBuilder withUpgradeFrom(UpgradeFrom upgradeFrom)
public StreamsConfigBuilder withWindowStoreChangeLogAdditionalRetention(Duration windowStoreChangeLogAdditionalRetention)
public StreamsConfigBuilder withAcceptableRecoveryLag(long acceptableRecoveryLag)
public StreamsConfigBuilder withMaxWarmupReplicas(int maxWarmupReplicas)
public StreamsConfigBuilder withProbingRebalanceInterval(Duration probingRebalanceInterval)
Copyright © 2021. All rights reserved.