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
    org.apache.kafka.common.KafkaFuture.Function
    Since Kafka 3.0. Use the KafkaFuture.BaseFunction functional interface.
    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.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.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.streams.processor.TaskId.partition
    org.apache.kafka.streams.processor.TaskId.topicGroupId
    org.apache.kafka.streams.StreamsConfig.DEFAULT_WINDOWED_KEY_SERDE_INNER_CLASS
    org.apache.kafka.streams.StreamsConfig.DEFAULT_WINDOWED_VALUE_SERDE_INNER_CLASS
    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.RETRIES_CONFIG
    since 2.7
    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.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)
    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.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()
    Use KeyQueryMetadata.activeHost() instead.
    org.apache.kafka.streams.KeyQueryMetadata.getPartition()
    Use KeyQueryMetadata.partition() instead.
    org.apache.kafka.streams.KeyQueryMetadata.getStandbyHosts()
    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.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.
  • Deprecated Constructors
    Constructor
    Description
    org.apache.kafka.clients.admin.DescribeTopicsResult(Map<String, KafkaFuture<TopicDescription>>)
    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.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>)