Reputation: 41
As there is no "to()" method for KTable so do we need to always convert it to KStream before sending any message to a topic? Or how can we store a KTable in our topic?
Upvotes: 4
Views: 3234
Reputation: 9715
Note that KTable
had a to method some time ago.
In general, if you check older versions of KTable
, like 1.0, you'll see that the API was simplified significantly and more than a dozen methods were deprecated, many of them deleted as of today, including to()
:
Upvotes: 1
Reputation: 5443
Yes, in order to materialize a KTable
to a topic, you're required to convert it to a regular stream (instead of a changelog stream) via table.toStream().to("myTopic")
.
Upvotes: 5