Skip to content

Comments

KAFKA-19976: Deprecate streams-scala module#21480

Open
FrankYang0529 wants to merge 4 commits intoapache:trunkfrom
FrankYang0529:KAFKA-19976
Open

KAFKA-19976: Deprecate streams-scala module#21480
FrankYang0529 wants to merge 4 commits intoapache:trunkfrom
FrankYang0529:KAFKA-19976

Conversation

@FrankYang0529
Copy link
Member

@FrankYang0529 FrankYang0529 commented Feb 15, 2026

KIP-1244: https://cwiki.apache.org/confluence/x/r4LMFw

  • Deprecate streams-scala module
  • Add migration document

Signed-off-by: PoAn Yang <payang@apache.org>
Signed-off-by: PoAn Yang <payang@apache.org>
@FrankYang0529
Copy link
Member Author

@chia7712 Thanks for the review. Updated it.

@mjsax mjsax added the kip Requires or implements a KIP label Feb 16, 2026
Copy link
Member

@mjsax mjsax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also add something to docs/streams/upgrade-guide.md ?

* @param inner The underlying Java abstraction for KTable
* @see `org.apache.kafka.streams.kstream.KTable`
*/
@deprecated("Use `org.apache.kafka.streams.kstream.KTable` instead", "4.0.0")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4.0.0 -> 4.3.0

import org.apache.kafka.common.serialization.{Deserializer, Serde, Serdes => JSerdes, Serializer}
import org.apache.kafka.streams.kstream.WindowedSerdes

@deprecated("Use org.apache.kafka.common.serialization.Serdes instead", "3.0.0")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.0.0 -> 4.3.0

props.put(StreamsConfig.APPLICATION_ID_CONFIG, "wordcount")
props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092")
// Configure default serdes
props.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.StringSerde.class)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Serdes.StringSerde.class -> Serdes.StringSerde.getClass

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both would work. Personally, I actually thing .class is better.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, I think both of us are just Scala tourists here. 😅 Since the example is written in Scala, the correct way should actually be classOf[Serdes.StringSerde].

props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092")
// Configure default serdes
props.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.StringSerde.class)
props.put(StreamsConfig.DEFAULT_VALUE_SERDE_CLASS_CONFIG, Serdes.StringSerde.class)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved kip Requires or implements a KIP streams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants