I have one query stream and one item stream. I want to join these two stream on the query_id, the relation is one-to-many. How can I emit the item immediately to the output stream after its arrival and get some info from the query.
You could do this either using Table API and a simple join or you could implement it yourself using CoFlatMap on stream keyed by the query_id and buffering incoming events in the state. You should consider some retention policy though, to make sure the state won't grow infinitely.