Open solsson opened 5 years ago
I don't think this has anything to do with out of order updates. It's just that we add onupdate items from the streams thread and remove them from the main thread that polls onupdate.
I've seen documentation on streams API support for scheduled operations, which could be an alternative to polling form main, but I can't find it now. Anyhow there could be many threads in streams so concurrent updates wouldn't be ruled out anyway.
Using a ConcurrentHashMap would be possible, but I'd like iteration order to be that of inertion as with LinkedHashMap. Using synchronized
is another option.
e7736fecdd131afe120a84a688bf8ed70ef73f03 introduced a punctuation that we might want to move polling to. There's some info on the threading model at https://docs.confluent.io/current/streams/architecture.html#threading-model