Description
Issue described in ksqlDB : confluentinc/ksql#8440
Solutions described in Kafka streams : confluentinc/kafka-streams-examples#411
This GitHub issue is to track adding the KStreams solutions as a Kafka Tutorial
Additional notes:
you simply will have to decide how long to “wait” until you assume you’ve received “all” the messages within a given window, at which point you order them as desired. But there will always be the risk that if you wanted just one second longer - a message may arrive that was supposed to be processed first.
The only way to really fix this - is to fix it all the way up the chain to the source, so that all messages of a given key flow along the same path, and rely on TCP’s reordering.
if order is mission critical, then you either fix it all as above, or you wait so long that you know you’ve got all relevant messages…