Skip to content

building a GlobalKTable #222

Closed Answered by LGouellec
pitermarx asked this question in Q&A
Dec 15, 2022 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Hi @pitermarx,

Unfortunately, you can't consume a topic and built a global store manually (you can do it in Kafka Streams JAVA).
With Streamiz, you have to consume your topic, aggregate, forward the result of your aggregation into an another topic and use this topic as a globalKtable.

It's not recommanded to use the changelog topic because it's an internal topic and we don't manage it all.

So regarding your use case, it could look like this :

StreamBuilder builder = new();

IKTable<string, ComplexType> ktable = builder
    .Stream<string, ComplexType>("inputTopic")
    .GroupByKey()
    .Aggregate<ComplexType>(
        () => null!,
        // let's imagine a complex aggregation
        (key,

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@pitermarx
Comment options

@LGouellec
Comment options

@pitermarx
Comment options

Answer selected by pitermarx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants