Код: Выделить всё
logger.info("starting publish to other servers");
Mono ipsOfOtherServer = otherServers
.filter(//some filter condition//)
.groupBy(OtherServers::getServerIp)
.collectMap(GroupedFlux::key)
.flatMapMany(map -> Flux.fromIterable(map.entrySet()))
.collectList()
.doOnSuccess(list -> {
if(list.isEmpty()) {
logger.info("list is empty");
}
});
ipsOfOtherServer
.flatMapMany(Flux::fromIterable)
.concatMap(//logic to send message to other server//)
.block()
Подробнее здесь: https://stackoverflow.com/questions/790 ... is-missing
Мобильная версия