API Compatibility changes in 7.1.9 for Kafka

Removed or Modified APIs in CDP 7.1.9 for Kafka and recommendations for how to handle them.

Apache Base Version of Kafka in 7.1.7 SP2 was 2.5.0 and Apache Base Version of Kafka in 7.1.9 is 3.4.1

Removed APIs in 7.1.9

The following APIs are no longer available for Kafka in CDP 7.1.9

Count.'<init>'

Method Removed

Package Name
org.apache.kafka.common.metrics.stats
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-8696: clean up Sum/Count/Total metrics
Recommendation
Deprecated since 2.4 . Use WindowedCount instead
Recompilation Required?
Yes

Rate.SampledTotal.'<init>'

Method Removed

Package Name
org.apache.kafka.common.metrics.stats
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-8696: clean up Sum/Count/Total metrics
Recommendation
Deprecated since 2.4 Use WindowedSum instead.
Recompilation Required?
Yes

Sum.'<init>'

Method Removed

Package Name
org.apache.kafka.common.metrics.stats
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-8696: clean up Sum/Count/Total metrics
Recommendation
Deprecated since 2.4 Use WindowedSum instead.
Recompilation Required?
Yes

Total.'<init>'

Method Removed

Package Name
org.apache.kafka.common.metrics.stats
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-8696: clean up Sum/Count/Total metrics
Recommendation
Deprecated since 2.4 Use CumulativeSum instead.
Recompilation Required?
Yes

Count

This class has been removed.

Package Name
org.apache.kafka.common.metrics.stats
Effect
Recompilation of a client program may be terminated with the message: cannot find class org.apache.kafka.common.metrics.stats.Count.
Reason for change
KAFKA-8696: clean up Sum/Count/Total metrics
Recommendation
Deprecated since 2.4 . Use WindowedCount instead
Recompilation Required?
Yes

Count

This class has been removed.

Package Name
org.apache.kafka.common.metrics.stats
Effect
A client program may be interrupted by NoClassDefFoundError exception.
Reason for change
KAFKA-8696: clean up Sum/Count/Total metrics
Recommendation
Deprecated since 2.4 . Use WindowedCount instead
Recompilation Required?
Yes

Rate.SampledTotal

This class has been removed.

Package Name
org.apache.kafka.common.metrics.stats
Effect
Recompilation of a client program may be terminated with the message: cannot find class org.apache.kafka.common.metrics.stats.Rate.SampledTotal.
Reason for change
KAFKA-8696: clean up Sum/Count/Total metrics
Recommendation
Deprecated since 2.4 Use WindowedSum instead.
Recompilation Required?
Yes

Rate.SampledTotal

This class has been removed.

Package Name
org.apache.kafka.common.metrics.stats
Effect
A client program may be interrupted by NoClassDefFoundError exception.
Reason for change
KAFKA-8696: clean up Sum/Count/Total metrics
Recommendation
Deprecated since 2.4 Use WindowedSum instead.
Recompilation Required?
Yes

Sum

This class has been removed.

Package Name
org.apache.kafka.common.metrics.stats
Effect
Recompilation of a client program may be terminated with the message: cannot find class org.apache.kafka.common.metrics.stats.Sum.
Reason for change
KAFKA-8696: clean up Sum/Count/Total metrics
Recommendation
Deprecated since 2.4 Use WindowedSum instead.
Recompilation Required?
Yes

Sum

This class has been removed.

Package Name
org.apache.kafka.common.metrics.stats
Effect
A client program may be interrupted by NoClassDefFoundError exception.
Reason for change
KAFKA-8696: clean up Sum/Count/Total metrics
Recommendation
Deprecated since 2.4 Use WindowedSum instead.
Recompilation Required?
Yes

Total

This class has been removed.

Package Name
org.apache.kafka.common.metrics.stats
Effect
Recompilation of a client program may be terminated with the message: cannot find class org.apache.kafka.common.metrics.stats.Total.
Reason for change
KAFKA-8696: clean up Sum/Count/Total metrics
Recommendation
Deprecated since 2.4 Use CumulativeSum instead.
Recompilation Required?
Yes

Total

This class has been removed.

Package Name
org.apache.kafka.common.metrics.stats
Effect
A client program may be interrupted by NoClassDefFoundError exception.
Reason for change
KAFKA-8696: clean up Sum/Count/Total metrics
Recommendation
Deprecated since 2.4 Use CumulativeSum instead.
Recompilation Required?
Yes

Modified APIs in 7.1.9

The following APIs have been modified for Kafka and include a description of the impact of the modifiaction on their use.

KafkaStreams.close

Method Removed

Package Name
org.apache.kafka.streams
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-7477: Improve Streams close timeout semantics (#5747)
Recommendation
Deprecated. Use close(Duration) instead; note, that close(Duration) has different semantics and does not block on zero, e.g., `Duration.ofMillis(0)`.
Recompilation Required?
Yes

KafkaStreams.metadataForKey

Method Removed

Package Name
org.apache.kafka.streams
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-6144: Add KeyQueryMetadata APIs to KafkaStreams
Recommendation
Deprecated. Since 2.5. Use queryMetadataForKey(String, Object, Serializer) instead.
Recompilation Required?
Yes

KafkaStreams.store

Method Removed

Package Name
org.apache.kafka.streams
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-9487: Follow-up PR of Kafka-9445
Recommendation
Deprecated. since 2.5 release; use store(StoreQueryParameters) instead
Recompilation Required?
Yes

StreamsBuilder.addGlobalStore

Method Removed

Package Name
org.apache.kafka.streams
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-10379: Implement the KIP-478 StreamBuilder#addGlobalStore()
Recommendation
Deprecated. use addGlobalStore(StoreBuilder, String, Consumed, ProcessorSupplier) instead
Recompilation Required?
Yes

StreamsConfig.getConsumerConfigs

Method Removed

Package Name
org.apache.kafka.streams
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-8284: enable static membership on KStream
Recommendation
Deprecated. use getMainConsumerConfigs(String, String, int)
Recompilation Required?
Yes

StreamsMetrics.addLatencyAndThroughputSensor

Method Removed

Package Name
org.apache.kafka.streams
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-9230: Refactor user-customizable Streams metrics
Recommendation
Deprecated. since 2.5. Use addLatencyRateTotalSensor() instead.
Recompilation Required?
Yes

UnlimitedWindows.maintainMs

Method Removed

Package Name
org.apache.kafka.streams.kstream
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-7277: Migrate Streams API to Duration instead of longMs times
Recommendation
Deprecated since 2.1. Use Materialized.retention instead.
Recompilation Required?
Yes

UnlimitedWindows.startOn

Method Removed

Package Name
org.apache.kafka.streams.kstream
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-7277: Migrate Streams API to Duration instead of longMs times
Recommendation
Use UnlimitedWindows.startOn(Instant) instead
Recompilation Required?
Yes

Windows.maintainMs

Method Removed

Package Name
org.apache.kafka.streams.kstream
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-7277: Migrate Streams API to Duration instead of longMs times
Recommendation
Deprecated since 2.1. This function should not be used anymore, since JoinWindows.until(long) is deprecated in favor of JoinWindows.grace(Duration).
Recompilation Required?
Yes

Windows.segments

Method Removed

Package Name
org.apache.kafka.streams.kstream
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-7277: Migrate Streams API to Duration instead of longMs times
Recommendation
Deprecated since 2.1 Override segmentInterval() instead.
Recompilation Required?
Yes

Windows.until

Method Removed

Package Name
org.apache.kafka.streams.kstream
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-7277: Migrate Streams API to Duration instead of longMs times
Recommendation
Deprecated since 2.1. Use Materialized.withRetention(Duration) or directly configure the retention in a store supplier and use Materialized.as(WindowBytesStoreSupplier).
Recompilation Required?
Yes

Serialized<K;V>

This class has been removed.

Package Name
org.apache.kafka.streams.kstream
Effect
Recompilation of a client program may be terminated with the message: cannot find class org.apache.kafka.streams.kstream.SerializedK;V.
Reason for change
KAFKA-7406: Name join group repartition topics
Recommendation
Deprecated since 2.1. Use Grouped instead
Recompilation Required?
Yes

Serialized<K;V>

This class has been removed.

Package Name
org.apache.kafka.streams.kstream
Effect
A client program may be interrupted by NoClassDefFoundError exception.
Reason for change
KAFKA-7406: Name join group repartition topics
Recommendation
Deprecated since 2.1. Use Grouped instead
Recompilation Required?
Yes

Windows<W>

Field segments of type int has been removed from this class.

Package Name
org.apache.kafka.streams.kstream
Effect
Recompilation of a client program may be terminated with the message: cannot find variable segments in org.apache.kafka.streams.kstream.WindowsW.
Reason for change
KAFKA-7080: replace numSegments with segmentInterval
Recommendation
Deprecated since 2.1 Override segmentInterval() instead.
Recompilation Required?
Yes

Windows<W>

Field segments of type int has been removed from this class.

Package Name
org.apache.kafka.streams.kstream
Effect
A client program may be interrupted by NoSuchFieldError exception.
Reason for change
KAFKA-7080: replace numSegments with segmentInterval
Recommendation
Deprecated since 2.1 Override segmentInterval() instead.
Recompilation Required?
Yes

DefaultPartitionGrouper.'<init>'

Method Removed

Package Name
org.apache.kafka.streams.processor
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-8927: Deprecate PartitionGrouper interface
Recommendation
Deprecated since 2.4 release; will be removed in 3.0.0 via KAFKA-7785
Recompilation Required?
Yes

DefaultPartitionGrouper.maxNumPartitions

Method Removed

Package Name
org.apache.kafka.streams.processor
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-8927: Deprecate PartitionGrouper interface
Recommendation
Deprecated since 2.4 release; will be removed in 3.0.0 via KAFKA-7785
Recompilation Required?
Yes

DefaultPartitionGrouper.partitionGroups

Method Removed

Package Name
org.apache.kafka.streams.processor
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-8927: Deprecate PartitionGrouper interface
Recommendation
Deprecated since 2.4 release; will be removed in 3.0.0 via KAFKA-7785
Recompilation Required?
Yes

MockProcessorContext.forward

Method Removed

Package Name
org.apache.kafka.streams.processor
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
MINOR: cleanup deprectaion annotations
Recommendation
please use ProcessorContext.forward(Object, Object, To) instead
Recompilation Required?
Yes

MockProcessorContext.schedule

Method Removed

Package Name
org.apache.kafka.streams.processor
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-7277: Migrate Streams API to Duration instead of longMs times
Recommendation
Deprecated since 2.1. Use WindowBytesStoreSupplier.segmentIntervalMs() instead.
Recompilation Required?
Yes

PartitionGrouper.partitionGroups

Method Removed

Package Name
org.apache.kafka.streams.processor
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-8927: Deprecate PartitionGrouper interface
Recommendation
Deprecated since 2.4 release; will be removed in 3.0.0 via KAFKA-7785
Recompilation Required?
Yes

ProcessorContext.forward

Method Removed

Package Name
org.apache.kafka.streams.processor
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-6454: Allow timestamp manipulation in Processor API
Recommendation
please use ProcessorContext.forward(Object, Object, To) instead
Recompilation Required?
Yes

ProcessorContext.schedule

Method Removed

Package Name
org.apache.kafka.streams.processor
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-6454: Allow timestamp manipulation in Processor API
Recommendation
Use ProcessorContext.schedule(Duration, PunctuationType, Punctuator) instead
Recompilation Required?
Yes

DefaultPartitionGrouper

This class has been removed.

Package Name
org.apache.kafka.streams.processor
Effect
Recompilation of a client program may be terminated with the message: cannot find class org.apache.kafka.streams.processor.DefaultPartitionGrouper.
Reason for change
KAFKA-8927: Deprecate PartitionGrouper interface
Recommendation
Deprecated since 2.4 release; will be removed in 3.0.0 via KAFKA-7785
Recompilation Required?
Yes

DefaultPartitionGrouper

This class has been removed.

Package Name
org.apache.kafka.streams.processor
Effect
A client program may be interrupted by NoClassDefFoundError exception.
Reason for change
KAFKA-8927: Deprecate PartitionGrouper interface
Recommendation
Deprecated since 2.4 release; will be removed in 3.0.0 via KAFKA-7785
Recompilation Required?
Yes

PartitionGrouper

This interface has been removed.

Package Name
org.apache.kafka.streams.processor
Effect
Recompilation of a client program may be terminated with the message: cannot find class org.apache.kafka.streams.processor.PartitionGrouper.
Reason for change
KAFKA-8927: Deprecate PartitionGrouper interface
Recommendation
Deprecated since 2.4 release; will be removed in 3.0.0 via KAFKA-7785
Recompilation Required?
Yes

PartitionGrouper

This interface has been removed.

Package Name
org.apache.kafka.streams.processor
Effect
A client program may be interrupted by NoClassDefFoundError exception.
Reason for change
KAFKA-8927: Deprecate PartitionGrouper interface
Recommendation
Deprecated since 2.4 release; will be removed in 3.0.0 via KAFKA-7785
Recompilation Required?
Yes

UsePreviousTimeOnInvalidTimestamp

This class has been removed.

Package Name
org.apache.kafka.streams.processor
Effect
Recompilation of a client program may be terminated with the message: cannot find class org.apache.kafka.streams.processor.UsePreviousTimeOnInvalidTimestamp.
Reason for change
KAFKA-8953: Rename UsePreviousTimeOnInvalidTimestamp to UsePartitionTimeOnInvalidTimestamp
Recommendation
Deprecated since 2.5. Use UsePartitionTimeOnInvalidTimestamp instead
Recompilation Required?
Yes

ReadOnlyWindowStore.fetch

Method Removed

Package Name
org.apache.kafka.streams.state
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-7277: Migrate Streams API to Duration instead of longMs times
Recommendation
Use ReadOnlyWindowStore.fetch(Object, Object, Instant, Instant) instead
Recompilation Required?
Yes

ReadOnlyWindowStore.fetchAll

Method Removed

Package Name
org.apache.kafka.streams.state
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-7277: Migrate Streams API to Duration instead of longMs times
Recommendation
Use ReadOnlyWindowStore.fetch(Object, Object, Instant, Instant) instead
Recompilation Required?
Yes

Stores.persistentSessionStore

Method Removed

Package Name
org.apache.kafka.streams.state
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-7277: Migrate Streams API to Duration instead of longMs times
Recommendation
Deprecated since 2.1 Use Stores.persistentSessionStore(String, Duration) instead
Recompilation Required?
Yes

Stores.persistentWindowStore

Method Removed

Package Name
org.apache.kafka.streams.state
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-7277: Migrate Streams API to Duration instead of longMs times
Recommendation
Deprecated since 2.1 Use Stores.persistentWindowStore(String, Duration, Duration, boolean) instead
Recompilation Required?
Yes

WindowBytesStoreSupplier.segments

Method Removed

Package Name
org.apache.kafka.streams.state
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-7080: replace numSegments with segmentInterval
Recommendation
Deprecated since 2.1. Use WindowBytesStoreSupplier.segmentIntervalMs() instead.
Recompilation Required?
Yes

WindowStore.put

Method Removed

Package Name
org.apache.kafka.streams.state
Effect
A client program may be interrupted by NoSuchMethodError exception.
Reason for change
KAFKA-7245: Deprecate WindowStore#put(key, value)
Recommendation
Deprecated as timestamp is not provided for the key-value pair, this causes inconsistency to identify the window frame to which the key belongs. Use WindowStore.put(Object, Object, long) instead.
Recompilation Required?
Yes