Does Flink guarantee the order of execution of a stream?
I have two Kafka topics (each with single partition), stream 1 and stream 2, and use keyBy
, the streams are processed by a coprocess
function.
During my testing I can see the the contents of both streams are not always executed in order.
I can set parallelism to 1 to get around this issue, but wanted to understand if what I am seeing is what is expected?
source1.keyBy(e -> e.f0);
source2.keyBy(e -> {
return new JSONObject(e.f1).getString("someOtherKey");
});
source1.connect(source2)
.process(new KeyedCoProcessFunction())
.uid("uid")
.name("name");