I have a materialized view that is updated from many streams. Every one enrich it partially. Order doesn't matter. Updates comes in not specified time. Is following algorithm is a good approach:
- Update comes and I check what is stored in materialized view via
get()
, that this is an initial one so enrich and save. - Second comes and
get()
shows that partial update exist - add next information - ... and I continue with same style
If there is a query/join, object that is stored has a method that shows that the update is not complete isValid()
that could be used in KafkaStreams#filter()
.
Could you share please is this a good plan? Is there any pattern in Kafka streams world that handle this case?
Please advice.