project-reactor Questions
3
Solved
I need to implement following behavior:
Make a REST post request
If response returns with a status 429 Too many requests, retry up to 3 times with a delay of 1 second
If the third retry fails or ...
Hutchinson asked 16/9, 2019 at 14:42
3
In Spring MVC, I had a @UniqueEmail custom hibernate validator (to check for uniqueness of email when signup), which looked as below:
public class UniqueEmailValidator
implements ConstraintValidat...
Orobanchaceous asked 12/7, 2018 at 8:9
13
Solved
I want to have centralised logging for requests and responses in my REST API on Spring WebFlux with Kotlin. So far I've tried this approaches
@Bean
fun apiRouter() = router {
(accept(MediaType.AP...
Talie asked 21/7, 2017 at 14:17
8
I keep studying and trying Reactive Style of coding using Reactor and RxJava. I do understand that reactive coding makes better utilization of CPU compared to single threaded execution.
Is there ...
Spalla asked 6/2, 2017 at 7:14
7
Solved
I referenced with the blog post Contextual Logging with Reactor Context and MDC but I don't know how to access reactor context in WebFilter.
@Component
public class RequestIdFilter implements WebF...
Monorail asked 8/8, 2018 at 3:14
2
Solved
Mono.delay(Duration.ofMillis(10)).map(d -> {
System.out.println(d);
return d;
}).block();
output : 0
Not able to see any output on console when I am calling with subscribe() or subscribe(-) ...
Jin asked 6/1, 2020 at 5:39
2
Is there a "default" scheduler in the Project Reactor? Which one is it? By "default" I mean the one used when no subscribeOn() nor publishOn() are called for the chain.
Hemelytron asked 19/4, 2022 at 12:52
2
Solved
I need to group infinite Flux by key with high cardinality.
For example:
group key is domain url
calls to one domain should be strictly sequential (next call happens after previous one is complete...
Notogaea asked 1/4, 2021 at 21:9
4
Solved
I am trying to return a 404 when a Flux is empty, similar to here:WebFlux functional: How to detect an empty Flux and return 404?
My main concern is that, when you check if the flux has elements i...
Proselyte asked 22/11, 2018 at 16:36
4
Solved
How can we handle exceptions globally when using reactive programming in Spring boot rest controller?
I would assume that @ControllerAdvice will not work because I have tried this and it was unsucc...
Jovitajovitah asked 26/6, 2019 at 16:58
2
Solved
I don't understand the use and the difference between then, thenEmpty, thenMany and flatMapMany on Flux or Mono in spring webflux.
Diegodiehard asked 14/1, 2018 at 22:24
2
I have a Flux and I want to convert it to List. How can I do that?
Flux<Object> getInstances(String serviceId); // Current one
List<Object> getInstances(String serviceId); // Demande...
Dearing asked 10/6, 2020 at 12:27
5
After upgrade Spring Boot version from 2.6.6 to 2.6.7, I'm getting below error while executing web client rest calls. Any idea?
Sample code
public void execute(BiConsumer<ResponseEntity<JsonN...
Vikkivikky asked 24/4, 2022 at 14:11
1
This thread is a continuation of the Github issue at: https://github.com/spring-projects/spring-data-r2dbc/issues/194
Context:
Hi,
I just tried a very simple Exemple, based on two reactive reposito...
Schulman asked 25/9, 2019 at 9:7
2
Solved
The code below executes all web requests (webClient) in parallel, not respecting the limit I put in parallel(5).
Flux.fromIterable(dataListWithHundredsElements)
.parallel(5).runOn(Schedulers.bou...
Endothelium asked 8/5, 2020 at 10:9
3
Solved
I have a Spring Webflux reactive service which receives a DTO and inserts it into multiple table.
Sometimes we may need to skip inserting into some tables based on the incoming DTO.
These are the r...
Flintlock asked 26/2, 2021 at 22:19
3
Solved
Could someone help me to understand the difference between:
Mono.defer()
Mono.create()
Mono.just()
How to use it properly?
Notation asked 13/5, 2019 at 15:25
4
Solved
I am using publishOn vs subscribeOn both on the same flux as follows:
System.out.println("*********Calling Concurrency************");
List<Integer> elements = new ArrayList<>();
Flu...
Bigod asked 3/1, 2018 at 7:54
3
Solved
I've a use case where the stream should only emit when the cumulative "sum" equals or exceeds a given value, n. Let's take the example of six integers with n = 5.
+---+------+---------+
|...
Subtenant asked 26/7, 2020 at 20:20
0
Background:
I have an application-wide universal exception handler to translate exceptions coming from R2dbcRepository, such as (an excerpt just to show the intended purpose):
@Component
public cla...
Largish asked 24/7, 2023 at 14:7
7
Solved
i'd like to retry the request 3 times after waiting 10sec when response is 5xx. but i don't see a method that I can use. On object
WebClient.builder()
.baseUrl("...").build().post()
.retrieve()....
Charge asked 23/10, 2019 at 10:35
3
In a traditional web application it is easy to validate the request body in the controller method, eg.
ResponseEntity create(@Valid @ResponseBody Post post) {
}
If it is a MVC application, we ...
Badillo asked 30/12, 2017 at 6:38
3
Solved
In my application I am using spring webflux and I am using webclient to retrieve details from some 3rd party API. Now, I want to store the first time webClient response in some in memory cache so t...
Bugbane asked 18/3, 2022 at 19:38
2
Solved
I have a Asyn call thrift interface:
public CompletableFuture<List<Long>> getFavourites(Long userId){
CompletableFuture<List<Long>> future = new CompletableFuture();
OctoT...
Coracoid asked 24/8, 2020 at 7:53
3
Solved
There are few question , but there answers are very specific to some code.
Generally, how to convert a Stream of Mono to Flux
List<Mono<String> listOfMono = stream()
.map( s -> { do som...
Imparipinnate asked 5/5, 2021 at 3:17
1 Next >
© 2022 - 2024 — McMap. All rights reserved.