I am using a GlobalKTable as a key-value store. The data in the store changes rarely, but it does change.
Once a week I receive a file, and the contents of that file is put onto a stream, in a key-value pair format. This is then stored as a GlobalKTable by the applications that require the data.
My concern is, the file doesn't specify when a key has been removed since the previous file. In this circumstance, I don't want the old, no-longer-valid keys to be hanging around forever in the application stores.
An example:
Week 1:
a=1
b=2
c=3
d=4
Week 2:
a=1
b=2
d=4
e=5
I have compaction enabled on the topic, and a retention period of a couple of weeks.
What would happen to c
in all the applications' GlobalKTable stores? Would it expire eventually once the topic removes the data from the stream? Or would it just stay there until the application restarted?