0
List<Mono<String>> responses = apiCall()

I would like to get Flux<String> to await all mono-s from list.

How could I achieve it ?

P.S.

I've found similar question but I need vice versa operation https://stackoverflow.com/a/44040346/2674303

gstackoverflow
  • 36,709
  • 117
  • 359
  • 710

1 Answers1

2

You could use Flux.mergeSequential() and Flux.collectList()

Mono<List<String>> list = Flux.mergeSequential(apiCall()).collectList();
tynn
  • 38,113
  • 8
  • 108
  • 143