I've got a couple of simple controllers like this:
@PostMapping(value = "/action", consumes = MediaType.APPLICATION_JSON_VALUE)
public Mono<ResponseEntity<StatusResponse>> action( @RequestBody MyRequest request,
@RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken) {
return service.process(request);
}
and inside a service call there are different reactive streams that at some point reach either a WebClient call - for exmample: RequestHeadersSpec#exchangeToMono , or a Redis operation - for example: ReactiveValueOperations#get
When reactive stream reaches either one of those operations it just hangs. There is no error, there is no empty value. Nothing happens. I've also got a Kafka listener that calls exactly the same service, but there it works absolutely fine. Also, if I call the same code through
publisher.subscribeOn(Schedulers.boundedElastic()).subscribe()
it also works fine. There is also no blocking calls in the code whatsoever.
I could not find any examples of similar behaviour so I have no idea what to do with it. What could possibly be the issue?