Java WebFlux/Reactor – Filter a Flux> with items only found in Mono>

I’m new to WebFlux/Reactor and having trouble wrapping my head around how to write this piece of code. Basically, I have a Flux which has a nested List foo and a Mono bar and I’d like to …

How do I compare the values in ‘Mono’?

Comparing the values in Mono a and Mono b, if the value in Mono a is larger, I want to throw an error. Mono a = getA(); Mono …

Spring WebFlux – Why I have to wait for WebClient response?

I have a my WebClient class as per below: public class WebClientSample { public static void main(String[] args) throws InterruptedException { System.out.println(mySimpleTestMethod()); …

Reduce a flux to mono using data from flux

I have this scenario. I have one paginated API which gives me the data for last 12 months. The response of the API is like: public class PagedTransfersDto { private List content; …

Is Reactor chain still running

I have an application based on Spring WebFlux and Reactor. Application starts everyday on a schedule and loads statistics. But there is also available a manual launch option through controller. So if …

Resilience4j Retry – logging retry attempts from client?

Is it possible to log retries attempts on client side with resilience4j please? Maybe via some kind of configuration, or settings. Currently, I am using resilience4j with Spring boot Webflux …

Which design pattern for merging 2 methods they differ in one place

I wonder which design pattern should I use in my case: I have 2 endpoints that use 2 service methods, each very similar, they differ only in invoking some different methods from the same service: My …

Merge two api responses into one using Webclient – Webflux

I’m using WebFlux and WebClient and I need to consume two APIs and merge its responses. The first API receive type and document number and returns a list with one element that contains customer data (…

WebFlux – how to check if Mono>> is empty to return 404

My code: public Mono>> allGroups( @PathVariable(value = “email”) String email, ServerWebExchange exchange) { return Mono.just( …

Deserializing a list of ints with Spring WebClient

I’m trying to communicate with a Rest service that returns a simple JSON array of ints, e.g. [1, 2, 3, 4] I have the following code to make the call via WebClient: client.get() .uri(“/…