I am trying to aggregate the result of 5 service calls in Spring reactive. Each service call makes an external API call and gets a result.
Example:
Mono<A> = serviceCall1(...);
Mono<B> = serviceCall2(...);
Mono<C> = serviceCall3(...);
Mono<D> = serviceCall4(...);
Mono<E> = serviceCall5(...);
What I need to do is to make all these calls in parallel, aggregate the result into a Mono. However, if any call fails, I should still be able to ensure that all calls complete. Some calls may fail, some may succeed.
How can I go about this?