Hi. I’ve got two streams, the first has basic mess...
# troubleshooting
s
Hi. I’ve got two streams, the first has basic messages and the other has IDs. There isn’t any sort of relation between the two that requires keying logic. If I want to randomly pair an entry from each of the streams to produce a tuple2 that I later processed, would a keyedCoProcessFunction be the right way to go about joining them?
I had previously tried to connect them and run them through a coflatmapfunction using state to associate them randomly but that didn’t work since it appears that state can’t be used with non-keyed streams. I am currently attempting to key both streams, feed this into a RichCoFlatMapFunction to produce the desired tuple. My concern is that this may be poor practice since I’m not really acting on the “key”ed aspect of the streams and the keying action isn’t cheap. I’d later be re-keying against nested arguments of the tuples and I’m somewhat concerned I may break ordering doing it this way.
I’m using Flink 1.15 btw. Any advice would be appreciated.