Here is the scenario, i Have a Flux that comes from a ReactiveMongoDB and another from WebClient, soo i need that for each item in Mongodb, I look for his items in a webclient.
The problem is that, i have been using block to wait from the webclient itens to come and this is affecting the performance.
If i not use Block, the response is send without the itens from webClient, soo its probaly not waiting this itens do come.
Is there any way to make all calls and wait later from this itens?
return planetaRepository.findAll().flatMap(planetaVO -> {
planetaServiceFacade.recuperarFilmesParticipados(planetaVO.getNome()).collectList().doOnNext(planetaVO::setFilmes).block();
return Flux.just(planetaVO);
});