Re: KTable as a compacted topic, implications

2020-05-19 Thread Raffaele Esposito
Thanks a lot ! On Tue, May 19, 2020 at 10:40 PM Matthias J. Sax wrote: > Yes, for EOW, writing into changelog topics happens in the same > transaction as writing to output topic. > > You might be interesting in this blog post: > https://www.confluent.io/blog/enabling-exactly-once-kafka-streams/

Re: KTable as a compacted topic, implications

2020-05-19 Thread Matthias J. Sax
Yes, for EOW, writing into changelog topics happens in the same transaction as writing to output topic. You might be interesting in this blog post: https://www.confluent.io/blog/enabling-exactly-once-kafka-streams/ On 5/19/20 1:22 PM, Raffaele Esposito wrote: > Thanks a lot Alex and Matthias, > F

Re: KTable as a compacted topic, implications

2020-05-19 Thread Raffaele Esposito
Thanks a lot Alex and Matthias, >From Alex answer, I understand that the record is written to the compacted topic as part of the transaction right ? On Tue, May 19, 2020 at 8:32 PM Matthias J. Sax wrote: > What Alex says is correct. > > The changelog topic is only written into during processing

Re: KTable as a compacted topic, implications

2020-05-19 Thread Matthias J. Sax
What Alex says is correct. The changelog topic is only written into during processing -- in fact, you could consider this write a "side effect" of doing `store.put()`. The changelog topic is only read when recovering from an error and the store needs to be rebuilt from it. -Matthias On 5/19/20

Re: KTable as a compacted topic, implications

2020-05-19 Thread Alex Craig
Hi Raffaele, hopefully others more knowledgeable will correct me if I'm wrong, but I don't believe anything gets read from the changelog topic. (other than at startup if the state-store needs to be restored) So in your Sub-topology-1, the only topic being consumed from is the repartition topic. A