Skip navigation links
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Index
  • Help

Deprecated API

Contents

  • Interfaces
  • Classes
  • Exceptions
  • Fields
  • Methods
  • Constructors
  • Deprecated Interfaces
    Interface
    Description
    org.apache.kafka.streams.processor.Processor
    Since 3.0. Use Processor instead.
    org.apache.kafka.streams.processor.ProcessorSupplier
    Since 3.0. Use ProcessorSupplier instead.
  • Deprecated Classes
    Class
    Description
    org.apache.kafka.clients.producer.UniformStickyPartitioner
    Since 3.3.0, in order to use default partitioning logic remove the partitioner.class configuration setting and set partitioner.ignore.keys=true. See KIP-794 for more info. The partitioning strategy:
    • If a partition is specified in the record, use it
    • Otherwise choose the sticky partition that changes when the batch is full. NOTE: In contrast to the DefaultPartitioner, the record key is NOT used as part of the partitioning strategy in this partitioner. Records with the same key are not guaranteed to be sent to the same partition. See KIP-480 for details about sticky partitioning.
    org.apache.kafka.common.KafkaFuture.Function
    Since Kafka 3.0. Use the KafkaFuture.BaseFunction functional interface.
    org.apache.kafka.common.security.oauthbearer.secured.OAuthBearerLoginCallbackHandler
    See org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginCallbackHandler
    org.apache.kafka.common.security.oauthbearer.secured.OAuthBearerValidatorCallbackHandler
    See org.apache.kafka.common.security.oauthbearer.OAuthBearerValidatorCallbackHandler
    org.apache.kafka.streams.processor.AbstractProcessor
    Since 3.0. Use Processor or ContextualProcessor instead.
    org.apache.kafka.streams.processor.TaskMetadata
    since 3.0, use TaskMetadata instead.
    org.apache.kafka.streams.processor.ThreadMetadata
    since 3.0 use ThreadMetadata instead
    org.apache.kafka.streams.state.StreamsMetadata
    since 3.0.0 use StreamsMetadata
  • Deprecated Exceptions
    Exceptions
    Description
    org.apache.kafka.common.errors.NotLeaderForPartitionException
    since 2.6. Use NotLeaderOrFollowerException.
  • Deprecated Fields
    Field
    Description
    org.apache.kafka.clients.admin.AdminClientConfig.AUTO_INCLUDE_JMX_REPORTER_CONFIG
    org.apache.kafka.clients.consumer.ConsumerConfig.AUTO_INCLUDE_JMX_REPORTER_CONFIG
    org.apache.kafka.clients.consumer.ConsumerRecord.NULL_CHECKSUM
    checksums are no longer exposed by this class, this constant will be removed in Apache Kafka 4.0 (deprecated since 3.0).
    org.apache.kafka.clients.producer.ProducerConfig.AUTO_INCLUDE_JMX_REPORTER_CONFIG
    org.apache.kafka.common.config.TopicConfig.MESSAGE_FORMAT_VERSION_CONFIG
    since 3.0, removal planned in 4.0. The default value for this config is appropriate for most situations.
    org.apache.kafka.common.config.TopicConfig.MESSAGE_FORMAT_VERSION_DOC
    since 3.0, removal planned in 4.0. The default value for this config is appropriate for most situations.
    org.apache.kafka.common.config.TopicConfig.MESSAGE_TIMESTAMP_DIFFERENCE_MAX_MS_CONFIG
    since 3.6, removal planned in 4.0. Use message.timestamp.before.max.ms and message.timestamp.after.max.ms instead
    org.apache.kafka.common.config.TopicConfig.MESSAGE_TIMESTAMP_DIFFERENCE_MAX_MS_DOC
    since 3.6, removal planned in 4.0. Use message.timestamp.before.max.ms and message.timestamp.after.max.ms instead
    org.apache.kafka.streams.processor.TaskId.partition
    org.apache.kafka.streams.processor.TaskId.topicGroupId
    org.apache.kafka.streams.StreamsConfig.AUTO_INCLUDE_JMX_REPORTER_CONFIG
    and will be removed in 4.0.0
    org.apache.kafka.streams.StreamsConfig.CACHE_MAX_BYTES_BUFFERING_CONFIG
    since 3.4.0 Use "statestore.cache.max.bytes" instead.
    org.apache.kafka.streams.StreamsConfig.DEFAULT_DSL_STORE
    org.apache.kafka.streams.StreamsConfig.DEFAULT_DSL_STORE_CONFIG
    org.apache.kafka.streams.StreamsConfig.DEFAULT_DSL_STORE_DOC
    org.apache.kafka.streams.StreamsConfig.DEFAULT_WINDOWED_KEY_SERDE_INNER_CLASS
    since 3.0.0 Use "windowed.inner.class.serde" instead.
    org.apache.kafka.streams.StreamsConfig.DEFAULT_WINDOWED_VALUE_SERDE_INNER_CLASS
    since 3.0.0 Use "windowed.inner.class.serde" instead.
    org.apache.kafka.streams.StreamsConfig.EXACTLY_ONCE
    since 3.0.0, will be removed in 4.0. Use "exactly_once_v2" instead.
    org.apache.kafka.streams.StreamsConfig.EXACTLY_ONCE_BETA
    since 3.0.0, will be removed in 4.0. Use "exactly_once_v2" instead.
    org.apache.kafka.streams.StreamsConfig.IN_MEMORY
    org.apache.kafka.streams.StreamsConfig.RETRIES_CONFIG
    since 2.7
    org.apache.kafka.streams.StreamsConfig.ROCKS_DB
    org.apache.kafka.streams.StreamsConfig.TOPOLOGY_OPTIMIZATION
    since 2.7; use StreamsConfig.TOPOLOGY_OPTIMIZATION_CONFIG instead
  • Deprecated Methods
    Method
    Description
    org.apache.kafka.clients.admin.Admin.alterConfigs(Map<ConfigResource, Config>)
    Since 2.3. Use Admin.incrementalAlterConfigs(Map).
    org.apache.kafka.clients.admin.Admin.alterConfigs(Map<ConfigResource, Config>, AlterConfigsOptions)
    Since 2.3. Use Admin.incrementalAlterConfigs(Map, AlterConfigsOptions).
    org.apache.kafka.clients.admin.DeleteTopicsResult.values()
    Since 3.0 use DeleteTopicsResult.topicNameValues() instead
    org.apache.kafka.clients.admin.DescribeLogDirsResult.all()
    Deprecated Since Kafka 2.7. Use DescribeLogDirsResult.allDescriptions().
    org.apache.kafka.clients.admin.DescribeLogDirsResult.values()
    Deprecated Since Kafka 2.7. Use DescribeLogDirsResult.descriptions().
    org.apache.kafka.clients.admin.DescribeTopicsResult.all()
    Since 3.1.0 use DescribeTopicsResult.allTopicNames() instead
    org.apache.kafka.clients.admin.DescribeTopicsResult.values()
    Since 3.1.0 use DescribeTopicsResult.topicNameValues() instead
    org.apache.kafka.clients.admin.FeatureUpdate.allowDowngrade()
    org.apache.kafka.clients.admin.ForwardingAdmin.alterConfigs(Map<ConfigResource, Config>, AlterConfigsOptions)
    org.apache.kafka.clients.admin.KafkaAdminClient.alterConfigs(Map<ConfigResource, Config>, AlterConfigsOptions)
    org.apache.kafka.clients.admin.ListConsumerGroupOffsetsOptions.topicPartitions()
    Since 3.3. Use Admin.listConsumerGroupOffsets(java.util.Map, ListConsumerGroupOffsetsOptions) to specify topic partitions.
    org.apache.kafka.clients.admin.ListConsumerGroupOffsetsOptions.topicPartitions(List<TopicPartition>)
    Since 3.3. Use Admin.listConsumerGroupOffsets(java.util.Map, ListConsumerGroupOffsetsOptions) to specify topic partitions.
    org.apache.kafka.clients.admin.UpdateFeaturesOptions.dryRun()
    org.apache.kafka.clients.admin.UpdateFeaturesOptions.dryRun(boolean)
    org.apache.kafka.clients.consumer.Consumer.committed(TopicPartition)
    org.apache.kafka.clients.consumer.Consumer.committed(TopicPartition, Duration)
    org.apache.kafka.clients.consumer.Consumer.poll(long)
    org.apache.kafka.clients.consumer.KafkaConsumer.committed(TopicPartition)
    since 2.4 Use KafkaConsumer.committed(Set) instead
    org.apache.kafka.clients.consumer.KafkaConsumer.committed(TopicPartition, Duration)
    since 2.4 Use KafkaConsumer.committed(Set, Duration) instead
    org.apache.kafka.clients.consumer.KafkaConsumer.poll(long)
    Since 2.0. Use KafkaConsumer.poll(Duration), which does not block beyond the timeout awaiting partition assignment. See KIP-266 for more information.
    org.apache.kafka.clients.consumer.MockConsumer.committed(TopicPartition)
    org.apache.kafka.clients.consumer.MockConsumer.committed(TopicPartition, Duration)
    org.apache.kafka.clients.consumer.MockConsumer.poll(long)
    org.apache.kafka.clients.consumer.MockConsumer.setException(KafkaException)
    Use MockConsumer.setPollException(KafkaException) instead
    org.apache.kafka.clients.producer.KafkaProducer.sendOffsetsToTransaction(Map<TopicPartition, OffsetAndMetadata>, String)
    Since 3.0.0, please use KafkaProducer.sendOffsetsToTransaction(Map, ConsumerGroupMetadata) instead.
    org.apache.kafka.clients.producer.MockProducer.sendOffsetsToTransaction(Map<TopicPartition, OffsetAndMetadata>, String)
    org.apache.kafka.clients.producer.Partitioner.onNewBatch(String, Cluster, int)
    Since 3.3.0
    org.apache.kafka.clients.producer.Producer.sendOffsetsToTransaction(Map<TopicPartition, OffsetAndMetadata>, String)
    org.apache.kafka.connect.sink.SinkTask.onPartitionsAssigned(Collection<TopicPartition>)
    Use SinkTask.open(Collection) for partition initialization.
    org.apache.kafka.connect.sink.SinkTask.onPartitionsRevoked(Collection<TopicPartition>)
    Use SinkTask.close(Collection) instead for partition cleanup.
    org.apache.kafka.connect.source.SourceTask.commitRecord(SourceRecord)
    Use SourceTask.commitRecord(SourceRecord, RecordMetadata) instead.
    org.apache.kafka.streams.errors.DefaultProductionExceptionHandler.handle(ProducerRecord<byte[], byte[]>, Exception)
    org.apache.kafka.streams.errors.DeserializationExceptionHandler.handle(ProcessorContext, ConsumerRecord<byte[], byte[]>, Exception)
    Since 3.9. Use DeserializationExceptionHandler.handle(ErrorHandlerContext, ConsumerRecord, Exception) instead.
    org.apache.kafka.streams.errors.LogAndContinueExceptionHandler.handle(ProcessorContext, ConsumerRecord<byte[], byte[]>, Exception)
    org.apache.kafka.streams.errors.LogAndFailExceptionHandler.handle(ProcessorContext, ConsumerRecord<byte[], byte[]>, Exception)
    org.apache.kafka.streams.errors.ProductionExceptionHandler.handle(ProducerRecord<byte[], byte[]>, Exception)
    Since 3.9. Use ProductionExceptionHandler.handle(ErrorHandlerContext, ProducerRecord, Exception) instead.
    org.apache.kafka.streams.errors.ProductionExceptionHandler.handleSerializationException(ProducerRecord, Exception)
    Since 3.9. Use ProductionExceptionHandler.handleSerializationException(ErrorHandlerContext, ProducerRecord, Exception, SerializationExceptionOrigin) instead.
    org.apache.kafka.streams.KafkaStreams.allMetadata()
    since 3.0.0 use KafkaStreams.metadataForAllStreamsClients()
    org.apache.kafka.streams.KafkaStreams.allMetadataForStore(String)
    since 3.0.0 use KafkaStreams.streamsMetadataForStore(java.lang.String) instead
    org.apache.kafka.streams.KafkaStreams.localThreadsMetadata()
    since 3.0 use KafkaStreams.metadataForLocalThreads()
    org.apache.kafka.streams.KafkaStreams.setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler)
    Since 2.8.0. Use KafkaStreams.setUncaughtExceptionHandler(StreamsUncaughtExceptionHandler) instead.
    org.apache.kafka.streams.KeyQueryMetadata.getActiveHost()
    since 2.7.0; use KeyQueryMetadata.activeHost() instead.
    org.apache.kafka.streams.KeyQueryMetadata.getPartition()
    since 2.7.0; use KeyQueryMetadata.partition() instead.
    org.apache.kafka.streams.KeyQueryMetadata.getStandbyHosts()
    since 2.7.0; use KeyQueryMetadata.standbyHosts() instead.
    org.apache.kafka.streams.kstream.JoinWindows.grace(Duration)
    since 3.0. Use JoinWindows.ofTimeDifferenceAndGrace(Duration, Duration) instead
    org.apache.kafka.streams.kstream.JoinWindows.of(Duration)
    since 3.0. Use JoinWindows.ofTimeDifferenceWithNoGrace(Duration)} instead
    org.apache.kafka.streams.kstream.KStream.branch(Named, Predicate<? super K, ? super V>...)
    since 2.8. Use KStream.split(Named) instead.
    org.apache.kafka.streams.kstream.KStream.branch(Predicate<? super K, ? super V>...)
    since 2.8. Use KStream.split() instead.
    org.apache.kafka.streams.kstream.KStream.flatTransform(TransformerSupplier<? super K, ? super V, Iterable<KeyValue<K1, V1>>>, String...)
    Since 3.3. Use KStream.process(ProcessorSupplier, String...) instead.
    org.apache.kafka.streams.kstream.KStream.flatTransform(TransformerSupplier<? super K, ? super V, Iterable<KeyValue<K1, V1>>>, Named, String...)
    Since 3.3. Use KStream.process(ProcessorSupplier, Named, String...) instead.
    org.apache.kafka.streams.kstream.KStream.flatTransformValues(ValueTransformerSupplier<? super V, Iterable<VR>>, String...)
    Since 3.3. Use KStream.processValues(FixedKeyProcessorSupplier, String...) instead.
    org.apache.kafka.streams.kstream.KStream.flatTransformValues(ValueTransformerSupplier<? super V, Iterable<VR>>, Named, String...)
    Since 3.3. Use KStream.processValues(FixedKeyProcessorSupplier, Named, String...) instead.
    org.apache.kafka.streams.kstream.KStream.flatTransformValues(ValueTransformerWithKeySupplier<? super K, ? super V, Iterable<VR>>, String...)
    Since 3.3. Use KStream.processValues(FixedKeyProcessorSupplier, String...) instead.
    org.apache.kafka.streams.kstream.KStream.flatTransformValues(ValueTransformerWithKeySupplier<? super K, ? super V, Iterable<VR>>, Named, String...)
    Since 3.3. Use KStream.processValues(FixedKeyProcessorSupplier, Named, String...) instead.
    org.apache.kafka.streams.kstream.KStream.process(ProcessorSupplier<? super K, ? super V>, String...)
    Since 3.0. Use KStream.process(org.apache.kafka.streams.processor.api.ProcessorSupplier, java.lang.String...) instead.
    org.apache.kafka.streams.kstream.KStream.process(ProcessorSupplier<? super K, ? super V>, Named, String...)
    Since 3.0. Use KStream.process(org.apache.kafka.streams.processor.api.ProcessorSupplier, org.apache.kafka.streams.kstream.Named, java.lang.String...) instead.
    org.apache.kafka.streams.kstream.KStream.through(String)
    since 2.6; use KStream.repartition() instead
    org.apache.kafka.streams.kstream.KStream.through(String, Produced<K, V>)
    since 2.6; use KStream.repartition(Repartitioned) instead
    org.apache.kafka.streams.kstream.KStream.transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>>, String...)
    Since 3.3. Use KStream.process(ProcessorSupplier, String...) instead.
    org.apache.kafka.streams.kstream.KStream.transform(TransformerSupplier<? super K, ? super V, KeyValue<K1, V1>>, Named, String...)
    Since 3.3. Use KStream.process(ProcessorSupplier, Named, String...) instead.
    org.apache.kafka.streams.kstream.KStream.transformValues(ValueTransformerSupplier<? super V, ? extends VR>, String...)
    Since 3.3. Use KStream.processValues(FixedKeyProcessorSupplier, String...) instead.
    org.apache.kafka.streams.kstream.KStream.transformValues(ValueTransformerSupplier<? super V, ? extends VR>, Named, String...)
    Since 3.3. Use KStream.processValues(FixedKeyProcessorSupplier, Named, String...) instead.
    org.apache.kafka.streams.kstream.KStream.transformValues(ValueTransformerWithKeySupplier<? super K, ? super V, ? extends VR>, String...)
    Since 3.3. Use KStream.processValues(FixedKeyProcessorSupplier, String...) instead.
    org.apache.kafka.streams.kstream.KStream.transformValues(ValueTransformerWithKeySupplier<? super K, ? super V, ? extends VR>, Named, String...)
    Since 3.3. Use KStream.processValues(FixedKeyProcessorSupplier, Named, String...) instead.
    org.apache.kafka.streams.kstream.KTable.join(KTable<KO, VO>, Function<V, KO>, ValueJoiner<V, VO, VR>, Named)
    since 3.1, removal planned for 4.0. Use KTable.join(KTable, Function, ValueJoiner, TableJoined) instead.
    org.apache.kafka.streams.kstream.KTable.join(KTable<KO, VO>, Function<V, KO>, ValueJoiner<V, VO, VR>, Named, Materialized<K, VR, KeyValueStore<Bytes, byte[]>>)
    since 3.1, removal planned for 4.0. Use KTable.join(KTable, Function, ValueJoiner, TableJoined, Materialized) instead.
    org.apache.kafka.streams.kstream.KTable.leftJoin(KTable<KO, VO>, Function<V, KO>, ValueJoiner<V, VO, VR>, Named)
    since 3.1, removal planned for 4.0. Use KTable.leftJoin(KTable, Function, ValueJoiner, TableJoined) instead.
    org.apache.kafka.streams.kstream.KTable.leftJoin(KTable<KO, VO>, Function<V, KO>, ValueJoiner<V, VO, VR>, Named, Materialized<K, VR, KeyValueStore<Bytes, byte[]>>)
    since 3.1, removal planned for 4.0. Use KTable.leftJoin(KTable, Function, ValueJoiner, TableJoined, Materialized) instead.
    org.apache.kafka.streams.kstream.SessionWindows.grace(Duration)
    since 3.0. Use SessionWindows.ofInactivityGapAndGrace(Duration, Duration) instead
    org.apache.kafka.streams.kstream.SessionWindows.with(Duration)
    since 3.0. Use SessionWindows.ofInactivityGapWithNoGrace(Duration) instead
    org.apache.kafka.streams.kstream.SlidingWindows.withTimeDifferenceAndGrace(Duration, Duration)
    since 3.0. Use SlidingWindows.ofTimeDifferenceWithNoGrace(Duration) or SlidingWindows.ofTimeDifferenceAndGrace(Duration, Duration) instead
    org.apache.kafka.streams.kstream.TimeWindows.grace(Duration)
    since 3.0. Use TimeWindows.ofSizeAndGrace(Duration, Duration) instead
    org.apache.kafka.streams.kstream.TimeWindows.of(Duration)
    since 3.0. Use TimeWindows.ofSizeWithNoGrace(Duration) } instead
    org.apache.kafka.streams.kstream.WindowedSerdes.timeWindowedSerdeFrom(Class<T>)
    org.apache.kafka.streams.processor.MockProcessorContext.setTimestamp(long)
    Since 3.0.0; use MockProcessorContext.setRecordTimestamp(long) instead.
    org.apache.kafka.streams.processor.StateStore.init(ProcessorContext, StateStore)
    Since 2.7.0. Callers should invoke StateStore.init(StateStoreContext, StateStore) instead. Implementers may choose to implement this method for backward compatibility or to throw an informative exception instead.
    org.apache.kafka.streams.processor.StreamPartitioner.partition(String, K, V, int)
    org.apache.kafka.streams.processor.TaskId.readFrom(DataInputStream, int)
    since 3.0, for internal use, will be removed
    org.apache.kafka.streams.processor.TaskId.readFrom(ByteBuffer, int)
    since 3.0, for internal use, will be removed
    org.apache.kafka.streams.processor.TaskId.writeTo(DataOutputStream, int)
    since 3.0, for internal use, will be removed
    org.apache.kafka.streams.processor.TaskId.writeTo(ByteBuffer, int)
    since 3.0, for internal use, will be removed
    org.apache.kafka.streams.StreamsBuilder.addGlobalStore(StoreBuilder<?>, String, Consumed<K, V>, ProcessorSupplier<K, V>)
    Since 2.7.0; use StreamsBuilder.addGlobalStore(StoreBuilder, String, Consumed, ProcessorSupplier) instead.
    org.apache.kafka.streams.Topology.addGlobalStore(StoreBuilder<?>, String, Deserializer<K>, Deserializer<V>, String, String, ProcessorSupplier<K, V>)
    Since 2.7.0. Use Topology.addGlobalStore(StoreBuilder, String, Deserializer, Deserializer, String, String, ProcessorSupplier) instead.
    org.apache.kafka.streams.Topology.addGlobalStore(StoreBuilder<?>, String, TimestampExtractor, Deserializer<K>, Deserializer<V>, String, String, ProcessorSupplier<K, V>)
    Since 2.7.0. Use Topology.addGlobalStore(StoreBuilder, String, TimestampExtractor, Deserializer, Deserializer, String, String, ProcessorSupplier) instead.
    org.apache.kafka.streams.Topology.addProcessor(String, ProcessorSupplier, String...)
    Since 2.7.0 Use Topology.addProcessor(String, ProcessorSupplier, String...) instead.
    org.apache.kafka.streams.TopologyConfig.parseStoreType()
  • Deprecated Constructors
    Constructor
    Description
    org.apache.kafka.clients.admin.FeatureUpdate(short, boolean)
    org.apache.kafka.clients.admin.TopicListing(String, boolean)
    Since 3.0 use TopicListing(String, Uuid, boolean) instead
    org.apache.kafka.clients.consumer.ConsumerRecord(String, int, long, long, TimestampType, long, int, int, K, V)
    use one of the constructors without a `checksum` parameter. This constructor will be removed in Apache Kafka 4.0 (deprecated since 3.0).
    org.apache.kafka.clients.consumer.ConsumerRecord(String, int, long, long, TimestampType, Long, int, int, K, V, Headers)
    use one of the constructors without a `checksum` parameter. This constructor will be removed in Apache Kafka 4.0 (deprecated since 3.0).
    org.apache.kafka.clients.consumer.ConsumerRecord(String, int, long, long, TimestampType, Long, int, int, K, V, Headers, Optional<Integer>)
    use one of the constructors without a `checksum` parameter. This constructor will be removed in Apache Kafka 4.0 (deprecated since 3.0).
    org.apache.kafka.clients.producer.RecordMetadata(TopicPartition, long, long, long, Long, int, int)
    use constructor without `checksum` parameter. This constructor will be removed in Apache Kafka 4.0 (deprecated since 3.0).
    org.apache.kafka.common.errors.RecordDeserializationException(TopicPartition, long, String, Throwable)
    org.apache.kafka.common.metrics.JmxReporter(String)
    Since 2.6.0. Use JmxReporter() Initialize JmxReporter with JmxReporter.contextChange(MetricsContext) Populate prefix by adding _namespace/prefix key value pair to MetricsContext
    org.apache.kafka.streams.kstream.TimeWindowedDeserializer(Deserializer<T>)
    org.apache.kafka.streams.kstream.WindowedSerdes.TimeWindowedSerde(Serde<T>)