We have multiple input topics with different business events (page views, clicks, scroll events etc). As far as I understood Kafka streams they all get an event timestamp, which can be used for KStream joins with other streams or tables to align the times.
What we want to do is: Merge all different events (originating from the above mentioned different topics) for a user id (i.e. group by user id) and apply a session window to them. This should by possible by using groupByKey and then aggregate/reduce (specifying the Inactivity time here) on a stream containing all events. This combined stream must have all events from the different input topics in an order of the event time (or in a way that the above kafka streams methods honor this event times). The only challenge that is left, is to create this combined / merged stream. When I look at the Kafka Streams API, there is the KStreamBuilder#merge operation for which the javadoc says: There is no ordering guarantee for records from different {@link KStream}s.. Does this mean the Session Windowing will produce incorrect results? If yes, what is the alternative to #merge? This question is also on stackoverflow: https://stackoverflow.com/questions/45082816/how-to-merge-multiple-kafka-streams-in-order-to-do-a-session-windowing-over-all