I am using the Mutiny library within the Quarkus framework in Java 11.
I am wonderring which is the best way of running several events sequentially by storing them into a Multi object. I am going to describe my issue in the following java-like pseudocode:
for(P1 p1 : params1){
for(P2 p2 : params2){
multiObject.add(functionThatRetunsUni(p1, p2))
}
}
multiObject.runAll().sequentially();
I need to develop the actions sequentially since the function described in the pseudocode persist entities in a DB, so it maybe the case that two of the calls to the method need to persist the same entity.