Category "project-reactor"

Flux delayElements without initial delay

I would like to emit elements where elements are delayed each other by some time without initial delay. I can not use Flux.delayElements(Duration) because it d

Would delayElement be susceptible to a DoS attack?

I have a service that authenticates a user and I put delayElement for 2 seconds when it is about to return a 401. When I run through artillery, it seems to star

Spring Reactor onErrorContinue not working

As per documentation I am expecting onErrorContinue will ignore the error element and continue the sequence. Below test case is failing with exception java.lan

A difference between Mono.mapNotNull(....) and Mono.flatMap(Mono.justOrEmpty(....))

Being a novice to Project Reactor I'm trying to wrap my head around the documentation. However I still can't figure out if there any practical difference betwee

Converting a mono object into two different mono object and the root mono is executing two times

Suppose I have create a Student entity and storing it into database using reactive. Student student{ id; name; institutionId; courseId; } I

Reactor Mono, how to synch process (using .map()) and return Mono<void> from response.setComplete()

I have this method which gets redirection url and then redirect to that url private Mono<Void> redirectToUrl(ServerHttpResponse response, String status

Spring WebClient aggregates multiple 401 UNAUTHORIZED error to throw Exceptions.CompositeException

When WebClient calls an external api (with different query params) asynchronously with a wrong token, the first few returns with 401 UNAUTHORIZED and the contro

How do you take an initial sample from a flux?

The sample operation takes the first entry from flux after the duration. How can I make it such that I take the first entry on subscribe and then do the rest?

Measure execution time in Project Reactor

I'm trying to load test one of my projects and I think somewhere in my changes I may have introduced some point where the performance is getting impacted. Is th

Is it correct to convert a CompletableFuture<Stream<T>> to a Publisher<T>?

To allow multiple iterations on the resulting stream from a CompletableFuture<Stream<String>> I am considering one of the following approaches: Con

Mono class in Java: what is, and when to use?

I have this following code: import org.springframework.http.MediaType; import org.springframework.stereotype.Component; import org.springframework.web.reactive