Let's say I have the following flow
Mono.just("value 1")
.zipWith(Mono.just("value 2"))
//Mono<Tuple2<String, String>>
.zipWhen(TupleUtils.function((value1, value2) -> Mono.fromCallable(() -> createValue3(value1, value2))))
//Mono<Tuple2<Tuple2<String, String>, String>>
And just for understanding
private String createValue3(String value1, String value2) {
return "value 3";
}
As a result, I have
Mono<Tuple2<Tuple2<String, String>, String>>
but I need
Mono<Tuple3<String, String, String>>
To continue frow with
.map(TupleUtils.function((value1, value2, value3) -> ...))
Is there any good solution for this problem?
zip(pub1, pub2, pub3
would have been an option otherwise. – Simon Baslé