Spring WebFlux: Only one connection receive subscriber allowed
I am writing a simple app with Spring 5 Webflux and Kotlin. I am trying to implement PUT endpoint in a following way: PUT("/confs/{id}", { val id = it.pathVariable("id") ServerResponse.ok().body(service.save(it.bodyToMono(Item::class.java)), Item::class.java) }) The trick on save is that I try to read a city name from item, resolve geo coordinates, overwrite them in original item and then save to Mongo using Spring Data Mongo Reactive repo. fun save(item: Mono<Item>): Mono<Item> { val geo = item.flatMap { val city = it.location?.city ?: "Somewhere" geoService.resolveGeoFromCity(city) } val