I need to re-sequence the data that comes from two topics (merged using an outer join). Is it good practice to use a StateStore
to keep the latest sequence and modify the downstream stream value with the re-sequenced message.
Simplified problem :
(seq from topic A, seq from topic B) -> new seq to output (keeping the current sequence in the StateStore
)
(10,100) -> 1
(11,101) -> 2
(12,102) -> 3
(...,...) -> ...
The new sequence would be stored as value for the key "currentSeq" in the stateStore. The sequence will be incremented on each message and stored back to the stateStore.