i’m using Spring Webflux and trying to understand the timeout concept for a chain of Monos. For example, there’s a chain of Mono calls: How is timeout going to be applied: 1) For the operations in general (sum time of operations) 2) For ech operation (each operation should take no longer than timeout) 3) Only for the last operation (nOperation)
Tag: reactive-programming
Mono vs CompletableFuture
CompletableFuture executes a task on a separate thread ( uses a thread-pool ) and provides a callback function. Let’s say I have an API call in a CompletableFuture. Is that an API call blocking? Would the thread be blocked till it does not get a response from the API? ( I know main thread/tomcat thread will be non-blocking, but what
Mono.subscriberContext() returning old context
I have a class PublishContext with a method context() as follows : In above code, context object is Context0@744 and context1 is Context@747 which is understandable since context is immutable and always returns a new context. In my main class, I have the following code : Here, I am getting context as Context0@744, i.e Old context and hence, getting “context
Backpressure mechanism in Spring Web-Flux
I’m a starter in Spring Web-Flux. I wrote a controller as follows: I know one of the reactive benefits is Backpressure, and it can balance the request or the response rate. I want to realize how to have backpressure mechanism in Spring Web-Flux. Answer Backpressure in WebFlux In order to understand how Backpressure works in the current implementation of the
Combine a list of Observables and wait until all completed
TL;DR How to convert Task.whenAll(List<Task>) into RxJava? My existing code uses Bolts to build up a list of asynchronous tasks and waits until all of those tasks finish before performing other steps. Essentially, it builds up a List<Task> and returns a single Task which is marked as completed when all tasks in the list complete, as per the example on