Package org.apache.kafka.streams
Class StreamsConfig
- java.lang.Object
-
- org.apache.kafka.common.config.AbstractConfig
-
- org.apache.kafka.streams.StreamsConfig
-
public class StreamsConfig extends org.apache.kafka.common.config.AbstractConfigConfiguration for aKafkaStreamsinstance. Can also be used to configure the Kafka Streams internalKafkaConsumer,KafkaProducerandAdminClient. To avoid consumer/producer/admin property conflicts, you should prefix those properties usingconsumerPrefix(String),producerPrefix(String)andadminClientPrefix(String), respectively.Example:
This instance can also be used to pass in custom configurations to different modules (e.g. passing a special config in your customized serde class). The consumer/producer/admin prefix can also be used to distinguish these custom config values passed to different clients with the same config name. * Example:// potentially wrong: sets "metadata.max.age.ms" to 1 minute for producer AND consumer Properties streamsProperties = new Properties(); streamsProperties.put(ConsumerConfig.METADATA_MAX_AGE_CONFIG, 60000); // or streamsProperties.put(ProducerConfig.METADATA_MAX_AGE_CONFIG, 60000); // suggested: Properties streamsProperties = new Properties(); // sets "metadata.max.age.ms" to 1 minute for consumer only streamsProperties.put(StreamsConfig.consumerPrefix(ConsumerConfig.METADATA_MAX_AGE_CONFIG), 60000); // sets "metadata.max.age.ms" to 1 minute for producer only streamsProperties.put(StreamsConfig.producerPrefix(ProducerConfig.METADATA_MAX_AGE_CONFIG), 60000); StreamsConfig streamsConfig = new StreamsConfig(streamsProperties);
When increasing bothProperties streamsProperties = new Properties(); // sets "my.custom.config" to "foo" for consumer only streamsProperties.put(StreamsConfig.consumerPrefix("my.custom.config"), "foo"); // sets "my.custom.config" to "bar" for producer only streamsProperties.put(StreamsConfig.producerPrefix("my.custom.config"), "bar"); // sets "my.custom.config2" to "boom" for all clients universally streamsProperties.put("my.custom.config2", "boom"); // as a result, inside producer's serde class configure(..) function, // users can now read both key-value pairs "my.custom.config" -> "foo" // and "my.custom.config2" -> "boom" from the config map StreamsConfig streamsConfig = new StreamsConfig(streamsProperties);ProducerConfig.RETRIES_CONFIGandProducerConfig.MAX_BLOCK_MS_CONFIGto be more resilient to non-available brokers you should also consider increasingConsumerConfig.MAX_POLL_INTERVAL_MS_CONFIGusing the following guidance:max.poll.interval.ms > min ( max.block.ms, (retries +1) * request.timeout.ms )Kafka Streams requires at least the following properties to be set: By default, Kafka Streams does not allow users to overwrite the following properties (Streams setting shown in parentheses):"enable.auto.commit"(false) - Streams client will always disable/turn off auto committing
"processing.guarantee"is set to"exactly_once", Kafka Streams does not allow users to overwrite the following properties (Streams setting shown in parentheses):"isolation.level"(read_committed) - Consumers will always read committed data only"enable.idempotence"(true) - Producer will always have idempotency enabled"max.in.flight.requests.per.connection"(1) - Producer will always have one in-flight request per connection
- See Also:
KafkaStreams(org.apache.kafka.streams.Topology, StreamsConfig),ConsumerConfig,ProducerConfig
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStreamsConfig.InternalConfig
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringADMIN_CLIENT_PREFIXPrefix used to isolateadminconfigs from other client configs.static java.lang.StringAPPLICATION_ID_CONFIGapplication.idstatic java.lang.StringAPPLICATION_SERVER_CONFIGuser.endpointstatic java.lang.StringAT_LEAST_ONCEConfig value for parameter"processing.guarantee"for at-least-once processing guarantees.static java.lang.StringBUFFERED_RECORDS_PER_PARTITION_CONFIGbuffered.records.per.partitionstatic java.lang.StringCACHE_MAX_BYTES_BUFFERING_CONFIGcache.max.bytes.bufferingstatic java.lang.StringCLIENT_ID_CONFIGclient.idstatic java.lang.StringCOMMIT_INTERVAL_MS_CONFIGcommit.interval.msstatic java.lang.StringCONNECTIONS_MAX_IDLE_MS_CONFIGconnections.max.idle.msstatic java.lang.StringCONSUMER_PREFIXPrefix used to isolateconsumerconfigs from other client configs.static java.lang.StringDEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIGdefault.deserialization.exception.handlerstatic java.lang.StringDEFAULT_KEY_SERDE_CLASS_CONFIGdefault key.serdestatic java.lang.StringDEFAULT_PRODUCTION_EXCEPTION_HANDLER_CLASS_CONFIGdefault.production.exception.handlerstatic java.lang.StringDEFAULT_TIMESTAMP_EXTRACTOR_CLASS_CONFIGdefault timestamp.extractorstatic java.lang.StringDEFAULT_VALUE_SERDE_CLASS_CONFIGdefault value.serdestatic java.lang.StringEXACTLY_ONCEConfig value for parameter"processing.guarantee"for exactly-once processing guarantees.static java.lang.StringKEY_SERDE_CLASS_CONFIGDeprecated.UseDEFAULT_KEY_SERDE_CLASS_CONFIGinstead.static java.lang.StringMETADATA_MAX_AGE_CONFIGmetadata.max.age.msstatic java.lang.StringMETRIC_REPORTER_CLASSES_CONFIGmetric.reportersstatic java.lang.StringMETRICS_NUM_SAMPLES_CONFIGmetrics.num.samplesstatic java.lang.StringMETRICS_RECORDING_LEVEL_CONFIGmetrics.record.levelstatic java.lang.StringMETRICS_SAMPLE_WINDOW_MS_CONFIGmetrics.sample.window.msstatic java.lang.StringNUM_STANDBY_REPLICAS_CONFIGnum.standby.replicasstatic java.lang.StringNUM_STREAM_THREADS_CONFIGnum.stream.threadsstatic java.lang.StringPARTITION_GROUPER_CLASS_CONFIGpartition.grouperstatic java.lang.StringPOLL_MS_CONFIGpoll.msstatic java.lang.StringPROCESSING_GUARANTEE_CONFIGprocessing.guaranteestatic java.lang.StringPRODUCER_PREFIXPrefix used to isolateproducerconfigs from other client configs.static java.lang.StringRECEIVE_BUFFER_CONFIGreceive.buffer.bytesstatic java.lang.StringRECONNECT_BACKOFF_MAX_MS_CONFIGreconnect.backoff.maxstatic java.lang.StringRECONNECT_BACKOFF_MS_CONFIGreconnect.backoff.msstatic java.lang.StringREPLICATION_FACTOR_CONFIGreplication.factorstatic java.lang.StringREQUEST_TIMEOUT_MS_CONFIGrequest.timeout.msstatic java.lang.StringRETRIES_CONFIGretriesstatic java.lang.StringRETRY_BACKOFF_MS_CONFIGretry.backoff.msstatic java.lang.StringROCKSDB_CONFIG_SETTER_CLASS_CONFIGrocksdb.config.setterstatic java.lang.StringSECURITY_PROTOCOL_CONFIGsecurity.protocolstatic java.lang.StringSEND_BUFFER_CONFIGsend.buffer.bytesstatic java.lang.StringSTATE_CLEANUP_DELAY_MS_CONFIGstate.cleanup.delaystatic java.lang.StringSTATE_DIR_CONFIGstate.dirstatic java.lang.StringSTREAMS_DEFAULT_STREAM_CONFIGstreams.default.stream}static java.lang.StringSTREAMS_INTERNAL_STREAM_COMMON_FOLDERMapR specific constants.static java.lang.StringSTREAMS_LOG_COMPACTION_CONFIGstreams.log.compaction}static java.lang.StringTIMESTAMP_EXTRACTOR_CLASS_CONFIGDeprecated.UseDEFAULT_TIMESTAMP_EXTRACTOR_CLASS_CONFIGinstead.static java.lang.StringTOPIC_PREFIXPrefix used to provide default topic configs to be applied when creating internal topics.static java.lang.StringUPGRADE_FROM_0100Config value for parameter"upgrade.from"for upgrading an application from version0.10.0.x.static java.lang.StringUPGRADE_FROM_CONFIGupgrade.fromstatic java.lang.StringUPGRADE_FROM_DOCstatic java.lang.StringVALUE_SERDE_CLASS_CONFIGDeprecated.UseDEFAULT_VALUE_SERDE_CLASS_CONFIGinstead.static java.lang.StringWINDOW_STORE_CHANGE_LOG_ADDITIONAL_RETENTION_MS_CONFIGwindowstore.changelog.additional.retention.msstatic java.lang.StringZOOKEEPER_CONNECT_CONFIGDeprecated.Kakfa Streams does not use Zookeeper anymore and this parameter will be ignored.
-
Constructor Summary
Constructors Constructor Description StreamsConfig(java.util.Map<?,?> props)Create a newStreamsConfigusing the given properties.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.StringadminClientPrefix(java.lang.String adminClientProp)Prefix a property withADMIN_CLIENT_PREFIX.static org.apache.kafka.common.config.ConfigDefconfigDef()Return a copy of the config definition.static java.lang.StringconsumerPrefix(java.lang.String consumerProp)Prefix a property withCONSUMER_PREFIX.DeserializationExceptionHandlerdefaultDeserializationExceptionHandler()org.apache.kafka.common.serialization.SerdedefaultKeySerde()Return anconfiguredinstance ofkey Serde class.ProductionExceptionHandlerdefaultProductionExceptionHandler()TimestampExtractordefaultTimestampExtractor()org.apache.kafka.common.serialization.SerdedefaultValueSerde()Return anconfiguredinstance ofvalue Serde class.java.util.Map<java.lang.String,java.lang.Object>getAdminConfigs(java.lang.String clientId)Get the configs for theadmin client.java.util.Map<java.lang.String,java.lang.Object>getConsumerConfigs(java.lang.String groupId, java.lang.String clientId)Get the configs to theconsumer.java.util.Map<java.lang.String,java.lang.Object>getProducerConfigs(java.lang.String clientId)Get the configs for theproducer.java.util.Map<java.lang.String,java.lang.Object>getRestoreConsumerConfigs(java.lang.String clientId)Get the configs for therestore-consumer.java.lang.StringgetStreamsCliSideAssignmentInternalStream()java.lang.StringgetStreamsInternalStreamCompacted()java.lang.StringgetStreamsInternalStreamFolder()java.lang.StringgetStreamsInternalStreamNotcompacted()org.apache.kafka.common.serialization.SerdekeySerde()Deprecated.static voidmain(java.lang.String[] args)protected java.util.Map<java.lang.String,java.lang.Object>postProcessParsedConfig(java.util.Map<java.lang.String,java.lang.Object> parsedValues)static java.lang.StringproducerPrefix(java.lang.String producerProp)Prefix a property withPRODUCER_PREFIX.static java.lang.StringtopicPrefix(java.lang.String topicProp)Prefix a property withTOPIC_PREFIXused to provide default topic configs to be applied when creating internal topics.org.apache.kafka.common.serialization.SerdevalueSerde()Deprecated.-
Methods inherited from class org.apache.kafka.common.config.AbstractConfig
equals, get, getBoolean, getClass, getConfiguredInstance, getConfiguredInstances, getConfiguredInstances, getConfiguredInstances, getDouble, getInt, getList, getLong, getPassword, getShort, getString, hashCode, ignore, logUnused, originals, originalsStrings, originalsWithPrefix, originalsWithPrefix, typeOf, unused, values, valuesWithPrefixAllOrNothing, valuesWithPrefixOverride
-
-
-
-
Field Detail
-
STREAMS_INTERNAL_STREAM_COMMON_FOLDER
public static final java.lang.String STREAMS_INTERNAL_STREAM_COMMON_FOLDER
MapR specific constants.- See Also:
- Constant Field Values
-
TOPIC_PREFIX
public static final java.lang.String TOPIC_PREFIX
Prefix used to provide default topic configs to be applied when creating internal topics. These should be valid properties fromTopicConfig. It is recommended to usetopicPrefix(String).- See Also:
- Constant Field Values
-
CONSUMER_PREFIX
public static final java.lang.String CONSUMER_PREFIX
Prefix used to isolateconsumerconfigs from other client configs. It is recommended to useconsumerPrefix(String)to add this prefix toconsumer properties.- See Also:
- Constant Field Values
-
PRODUCER_PREFIX
public static final java.lang.String PRODUCER_PREFIX
Prefix used to isolateproducerconfigs from other client configs. It is recommended to useproducerPrefix(String)to add this prefix toproducer properties.- See Also:
- Constant Field Values
-
ADMIN_CLIENT_PREFIX
public static final java.lang.String ADMIN_CLIENT_PREFIX
Prefix used to isolateadminconfigs from other client configs. It is recommended to useadminClientPrefix(String)to add this prefix toproducer properties.- See Also:
- Constant Field Values
-
UPGRADE_FROM_0100
public static final java.lang.String UPGRADE_FROM_0100
Config value for parameter"upgrade.from"for upgrading an application from version0.10.0.x.- See Also:
- Constant Field Values
-
AT_LEAST_ONCE
public static final java.lang.String AT_LEAST_ONCE
Config value for parameter"processing.guarantee"for at-least-once processing guarantees.- See Also:
- Constant Field Values
-
EXACTLY_ONCE
public static final java.lang.String EXACTLY_ONCE
Config value for parameter"processing.guarantee"for exactly-once processing guarantees.- See Also:
- Constant Field Values
-
APPLICATION_ID_CONFIG
public static final java.lang.String APPLICATION_ID_CONFIG
application.id- See Also:
- Constant Field Values
-
APPLICATION_SERVER_CONFIG
public static final java.lang.String APPLICATION_SERVER_CONFIG
user.endpoint- See Also:
- Constant Field Values
-
BUFFERED_RECORDS_PER_PARTITION_CONFIG
public static final java.lang.String BUFFERED_RECORDS_PER_PARTITION_CONFIG
buffered.records.per.partition- See Also:
- Constant Field Values
-
CACHE_MAX_BYTES_BUFFERING_CONFIG
public static final java.lang.String CACHE_MAX_BYTES_BUFFERING_CONFIG
cache.max.bytes.buffering- See Also:
- Constant Field Values
-
CLIENT_ID_CONFIG
public static final java.lang.String CLIENT_ID_CONFIG
client.id- See Also:
- Constant Field Values
-
COMMIT_INTERVAL_MS_CONFIG
public static final java.lang.String COMMIT_INTERVAL_MS_CONFIG
commit.interval.ms- See Also:
- Constant Field Values
-
CONNECTIONS_MAX_IDLE_MS_CONFIG
public static final java.lang.String CONNECTIONS_MAX_IDLE_MS_CONFIG
connections.max.idle.ms- See Also:
- Constant Field Values
-
DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG
public static final java.lang.String DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG
default.deserialization.exception.handler- See Also:
- Constant Field Values
-
DEFAULT_PRODUCTION_EXCEPTION_HANDLER_CLASS_CONFIG
public static final java.lang.String DEFAULT_PRODUCTION_EXCEPTION_HANDLER_CLASS_CONFIG
default.production.exception.handler- See Also:
- Constant Field Values
-
DEFAULT_KEY_SERDE_CLASS_CONFIG
public static final java.lang.String DEFAULT_KEY_SERDE_CLASS_CONFIG
default key.serde- See Also:
- Constant Field Values
-
DEFAULT_TIMESTAMP_EXTRACTOR_CLASS_CONFIG
public static final java.lang.String DEFAULT_TIMESTAMP_EXTRACTOR_CLASS_CONFIG
default timestamp.extractor- See Also:
- Constant Field Values
-
DEFAULT_VALUE_SERDE_CLASS_CONFIG
public static final java.lang.String DEFAULT_VALUE_SERDE_CLASS_CONFIG
default value.serde- See Also:
- Constant Field Values
-
KEY_SERDE_CLASS_CONFIG
@Deprecated public static final java.lang.String KEY_SERDE_CLASS_CONFIG
Deprecated.UseDEFAULT_KEY_SERDE_CLASS_CONFIGinstead.key.serde- See Also:
- Constant Field Values
-
METADATA_MAX_AGE_CONFIG
public static final java.lang.String METADATA_MAX_AGE_CONFIG
metadata.max.age.ms- See Also:
- Constant Field Values
-
METRICS_NUM_SAMPLES_CONFIG
public static final java.lang.String METRICS_NUM_SAMPLES_CONFIG
metrics.num.samples- See Also:
- Constant Field Values
-
METRICS_RECORDING_LEVEL_CONFIG
public static final java.lang.String METRICS_RECORDING_LEVEL_CONFIG
metrics.record.level- See Also:
- Constant Field Values
-
METRIC_REPORTER_CLASSES_CONFIG
public static final java.lang.String METRIC_REPORTER_CLASSES_CONFIG
metric.reporters- See Also:
- Constant Field Values
-
METRICS_SAMPLE_WINDOW_MS_CONFIG
public static final java.lang.String METRICS_SAMPLE_WINDOW_MS_CONFIG
metrics.sample.window.ms- See Also:
- Constant Field Values
-
NUM_STANDBY_REPLICAS_CONFIG
public static final java.lang.String NUM_STANDBY_REPLICAS_CONFIG
num.standby.replicas- See Also:
- Constant Field Values
-
NUM_STREAM_THREADS_CONFIG
public static final java.lang.String NUM_STREAM_THREADS_CONFIG
num.stream.threads- See Also:
- Constant Field Values
-
PARTITION_GROUPER_CLASS_CONFIG
public static final java.lang.String PARTITION_GROUPER_CLASS_CONFIG
partition.grouper- See Also:
- Constant Field Values
-
POLL_MS_CONFIG
public static final java.lang.String POLL_MS_CONFIG
poll.ms- See Also:
- Constant Field Values
-
PROCESSING_GUARANTEE_CONFIG
public static final java.lang.String PROCESSING_GUARANTEE_CONFIG
processing.guarantee- See Also:
- Constant Field Values
-
RECEIVE_BUFFER_CONFIG
public static final java.lang.String RECEIVE_BUFFER_CONFIG
receive.buffer.bytes- See Also:
- Constant Field Values
-
RECONNECT_BACKOFF_MS_CONFIG
public static final java.lang.String RECONNECT_BACKOFF_MS_CONFIG
reconnect.backoff.ms- See Also:
- Constant Field Values
-
RECONNECT_BACKOFF_MAX_MS_CONFIG
public static final java.lang.String RECONNECT_BACKOFF_MAX_MS_CONFIG
reconnect.backoff.max- See Also:
- Constant Field Values
-
REPLICATION_FACTOR_CONFIG
public static final java.lang.String REPLICATION_FACTOR_CONFIG
replication.factor- See Also:
- Constant Field Values
-
REQUEST_TIMEOUT_MS_CONFIG
public static final java.lang.String REQUEST_TIMEOUT_MS_CONFIG
request.timeout.ms- See Also:
- Constant Field Values
-
RETRIES_CONFIG
public static final java.lang.String RETRIES_CONFIG
retries- See Also:
- Constant Field Values
-
RETRY_BACKOFF_MS_CONFIG
public static final java.lang.String RETRY_BACKOFF_MS_CONFIG
retry.backoff.ms- See Also:
- Constant Field Values
-
ROCKSDB_CONFIG_SETTER_CLASS_CONFIG
public static final java.lang.String ROCKSDB_CONFIG_SETTER_CLASS_CONFIG
rocksdb.config.setter- See Also:
- Constant Field Values
-
SECURITY_PROTOCOL_CONFIG
public static final java.lang.String SECURITY_PROTOCOL_CONFIG
security.protocol- See Also:
- Constant Field Values
-
SEND_BUFFER_CONFIG
public static final java.lang.String SEND_BUFFER_CONFIG
send.buffer.bytes- See Also:
- Constant Field Values
-
STATE_CLEANUP_DELAY_MS_CONFIG
public static final java.lang.String STATE_CLEANUP_DELAY_MS_CONFIG
state.cleanup.delay- See Also:
- Constant Field Values
-
STATE_DIR_CONFIG
public static final java.lang.String STATE_DIR_CONFIG
state.dir- See Also:
- Constant Field Values
-
TIMESTAMP_EXTRACTOR_CLASS_CONFIG
@Deprecated public static final java.lang.String TIMESTAMP_EXTRACTOR_CLASS_CONFIG
Deprecated.UseDEFAULT_TIMESTAMP_EXTRACTOR_CLASS_CONFIGinstead.timestamp.extractor- See Also:
- Constant Field Values
-
UPGRADE_FROM_CONFIG
public static final java.lang.String UPGRADE_FROM_CONFIG
upgrade.from- See Also:
- Constant Field Values
-
UPGRADE_FROM_DOC
public static final java.lang.String UPGRADE_FROM_DOC
- See Also:
- Constant Field Values
-
VALUE_SERDE_CLASS_CONFIG
@Deprecated public static final java.lang.String VALUE_SERDE_CLASS_CONFIG
Deprecated.UseDEFAULT_VALUE_SERDE_CLASS_CONFIGinstead.value.serde- See Also:
- Constant Field Values
-
WINDOW_STORE_CHANGE_LOG_ADDITIONAL_RETENTION_MS_CONFIG
public static final java.lang.String WINDOW_STORE_CHANGE_LOG_ADDITIONAL_RETENTION_MS_CONFIG
windowstore.changelog.additional.retention.ms- See Also:
- Constant Field Values
-
ZOOKEEPER_CONNECT_CONFIG
@Deprecated public static final java.lang.String ZOOKEEPER_CONNECT_CONFIG
Deprecated.Kakfa Streams does not use Zookeeper anymore and this parameter will be ignored.zookeeper.connect- See Also:
- Constant Field Values
-
STREAMS_DEFAULT_STREAM_CONFIG
public static final java.lang.String STREAMS_DEFAULT_STREAM_CONFIG
streams.default.stream}- See Also:
- Constant Field Values
-
STREAMS_LOG_COMPACTION_CONFIG
public static final java.lang.String STREAMS_LOG_COMPACTION_CONFIG
streams.log.compaction}- See Also:
- Constant Field Values
-
-
Method Detail
-
consumerPrefix
public static java.lang.String consumerPrefix(java.lang.String consumerProp)
Prefix a property withCONSUMER_PREFIX. This is used to isolateconsumer configsfrom other client configs.- Parameters:
consumerProp- the consumer property to be masked- Returns:
CONSUMER_PREFIX+consumerProp
-
producerPrefix
public static java.lang.String producerPrefix(java.lang.String producerProp)
Prefix a property withPRODUCER_PREFIX. This is used to isolateproducer configsfrom other client configs.- Parameters:
producerProp- the producer property to be masked- Returns:
- PRODUCER_PREFIX +
producerProp
-
adminClientPrefix
public static java.lang.String adminClientPrefix(java.lang.String adminClientProp)
Prefix a property withADMIN_CLIENT_PREFIX. This is used to isolateadmin configsfrom other client configs.- Parameters:
adminClientProp- the admin client property to be masked- Returns:
- ADMIN_CLIENT_PREFIX +
adminClientProp
-
topicPrefix
public static java.lang.String topicPrefix(java.lang.String topicProp)
Prefix a property withTOPIC_PREFIXused to provide default topic configs to be applied when creating internal topics.- Parameters:
topicProp- the topic property to be masked- Returns:
- TOPIC_PREFIX +
topicProp
-
configDef
public static org.apache.kafka.common.config.ConfigDef configDef()
Return a copy of the config definition.- Returns:
- a copy of the config definition
-
postProcessParsedConfig
protected java.util.Map<java.lang.String,java.lang.Object> postProcessParsedConfig(java.util.Map<java.lang.String,java.lang.Object> parsedValues)
- Overrides:
postProcessParsedConfigin classorg.apache.kafka.common.config.AbstractConfig
-
getConsumerConfigs
public java.util.Map<java.lang.String,java.lang.Object> getConsumerConfigs(java.lang.String groupId, java.lang.String clientId)Get the configs to theconsumer. Properties using the prefixCONSUMER_PREFIXwill be used in favor over their non-prefixed versions except in the case ofConsumerConfig.BOOTSTRAP_SERVERS_CONFIGwhere we always use the non-prefixed version as we only support reading/writing from/to the same Kafka Cluster.- Parameters:
groupId- consumer groupIdclientId- clientId- Returns:
- Map of the consumer configuration.
-
getRestoreConsumerConfigs
public java.util.Map<java.lang.String,java.lang.Object> getRestoreConsumerConfigs(java.lang.String clientId)
Get the configs for therestore-consumer. Properties using the prefixCONSUMER_PREFIXwill be used in favor over their non-prefixed versions except in the case ofConsumerConfig.BOOTSTRAP_SERVERS_CONFIGwhere we always use the non-prefixed version as we only support reading/writing from/to the same Kafka Cluster.- Parameters:
clientId- clientId- Returns:
- Map of the consumer configuration.
-
getProducerConfigs
public java.util.Map<java.lang.String,java.lang.Object> getProducerConfigs(java.lang.String clientId)
Get the configs for theproducer. Properties using the prefixPRODUCER_PREFIXwill be used in favor over their non-prefixed versions except in the case ofProducerConfig.BOOTSTRAP_SERVERS_CONFIGwhere we always use the non-prefixed version as we only support reading/writing from/to the same Kafka Cluster.- Parameters:
clientId- clientId- Returns:
- Map of the producer configuration.
-
getAdminConfigs
public java.util.Map<java.lang.String,java.lang.Object> getAdminConfigs(java.lang.String clientId)
Get the configs for theadmin client.- Parameters:
clientId- clientId- Returns:
- Map of the admin client configuration.
-
keySerde
@Deprecated public org.apache.kafka.common.serialization.Serde keySerde()
Deprecated.Return anconfiguredinstance ofkey Serde class. This method is deprecated. UsedefaultKeySerde()method instead.- Returns:
- an configured instance of key Serde class
-
defaultKeySerde
public org.apache.kafka.common.serialization.Serde defaultKeySerde()
Return anconfiguredinstance ofkey Serde class.- Returns:
- an configured instance of key Serde class
-
valueSerde
@Deprecated public org.apache.kafka.common.serialization.Serde valueSerde()
Deprecated.Return anconfiguredinstance ofvalue Serde class. This method is deprecated. UsedefaultValueSerde()instead.- Returns:
- an configured instance of value Serde class
-
defaultValueSerde
public org.apache.kafka.common.serialization.Serde defaultValueSerde()
Return anconfiguredinstance ofvalue Serde class.- Returns:
- an configured instance of value Serde class
-
defaultTimestampExtractor
public TimestampExtractor defaultTimestampExtractor()
-
defaultDeserializationExceptionHandler
public DeserializationExceptionHandler defaultDeserializationExceptionHandler()
-
defaultProductionExceptionHandler
public ProductionExceptionHandler defaultProductionExceptionHandler()
-
getStreamsInternalStreamFolder
public java.lang.String getStreamsInternalStreamFolder()
-
getStreamsInternalStreamNotcompacted
public java.lang.String getStreamsInternalStreamNotcompacted()
-
getStreamsInternalStreamCompacted
public java.lang.String getStreamsInternalStreamCompacted()
-
getStreamsCliSideAssignmentInternalStream
public java.lang.String getStreamsCliSideAssignmentInternalStream()
-
main
public static void main(java.lang.String[] args)
-
-