If my reactive endpoint needs to call an external, non-reactive endpoint which does blocking stuff, is my reactive endpoint still reactive? I have 2 services running that levergaes Spring Boot MVC and Spring Webflux. Service A Spring Webflux Service B Spring MVC Now my Service A which is reactive calling the Service B endpoint which is blocking. Will my service
Tag: reactive-programming
Building a Recursive Data Structure with Spring WebFlux
I have a REST API that is built with the Spring WebFlux framework, and I have an endpoint which returns a Flux<ChannelResponse>, where ChannelResponse is a tree-structured object, as shown below: Now, I don’t have much experience with the reactive programming paradigm, but this is how I would implement such an endpoint with synchronous logic, such that each top-level channel
Uni.combine().all().unis() v.s. Multi..onItem().transformToMultiAndConcatenate().collect()
In my Quarkus service, I need to fetch a list of results from external service, and I figured out there are two methods to achieve the same goal: 1st approach based on Uni.combine().all(): 2nd approach based on Multi..onItem().transformToMultiAndConcatenate().collect() In the beginning I don’t think there exists any true difference between the two approaches, as Uni are evaluated lazily and either
Java reactor how to properly start async cancellable sideeffect
I’m trying to write something using reactor which I know how to write using completable futures. I’m getting “Calling subscribe in non-blocking scope” warning in it. My goal is to call …
Asynchronous Programming and Reactive Programming
This question is in my mind about a year. Actually are there any differences in Asysnchronus and Non-blocking. When we call the blocking part in our code then it becomes blocking which is synchronous …
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 (…
How to handle file access in a reactive environment
I’m refactoring some blocking code to reactive (using Reactor). I think most of the methods in the java.nio.file.Files class are blocking. Is it right if I replace a method like: public boolean exists(…
Use case of Flux and Mono
I am new to world of Flux and Monos, and recently, while using the findAll() method, I realized that this method is capable of returning partial responses , i.e via the Flux , and I need to do append …
RSocket retrieveFlux() with Kotlin
I am trying to write a client for my server (both in Kotlin and using Spring Reactive Web). I encountered this problem while trying to use the RSocket. How can I get a Flux using RSocket? @Component …
WebFlux – how to check if Mono>> is empty to return 404
My code: public Mono