Questions tagged [spring-reactive]

128 questions
1
vote
2 answers

org.springframework.boot.web.reactive.error.DefaultErrorAttributes is not getting called anymore in org.springframework.boot:2.3.1.RELEASE

Spring reactive web: Earlier in spring boot 2.2.*, i was using a class that extends DefaultErrorAttributes. This class was used to handle exceptions globally for the overall micro service. When i upgrade to 2.3.1, it's not working anymore. I don't…
rocks4530
  • 67
  • 2
  • 5
1
vote
1 answer

Spring data - webflux - Chaining requests

i use reactive Mongo Drivers and Web Flux dependancies I have a code like below. public Mono editEmployee(EmployeeEditRequest employeeEditRequest) { return employeeRepository.findById(employeeEditRequest.getId()) …
1
vote
1 answer

How to use iterable in StepVerifier in Spring Reactive testing

I have written a test method for creation of Flux object. Test Method: @Test public void testCreateFlux() { Flux fruitFlux = Flux .just("A", "B", "C", "D"); StepVerifier.create(fruitFlux) .expectNext("A") …
deadshot
  • 8,881
  • 4
  • 20
  • 39
1
vote
1 answer

Stream from WebClient into Flux. Blocking timeout throws exception

I am calling a streaming API with a WebClient in a Spring Boot application. I'd like to retrieve elements until I either received 10 elements, or 10 seconds have elapsed. I'd like the request to be blocking until either happens first. …
1
vote
1 answer

Connect with MSSQL with Spring Reactive (R2DBC), Error creating bean

I am currently trying to establish a database connection with a Microsoft SQL Server. Unfortunately I can not understand why it does not work. And the error message can unfortunately not give me precise information. Starter Class @ComponentScan({…
kemal
  • 41
  • 2
  • 7
1
vote
1 answer

Relatioships getting detached when saving new ones

Good morning, I am using SDN-RX which I am adding through spring-data-neo4j-rx-spring-boot-starter version 1.0.0-beta04 and my neo4j database is version 4.0.2 enterprise version. I have a ClassificationDomain node type and have defined a…
1
vote
1 answer

Dependant webclient calls - Spring Reactive

I am trying to do two API calls, the second API call is dependent on the first API response. The following piece of code gives response for first weblient call.Here I am not getting the response from second API call. On log I could see that the…
1
vote
1 answer

How to combine/chain multiple Mono/Flux containing different datatypes without nested subscriptions

We are using project-reactor to retrieve some data from an external webservice and generate a bunch of resulting objects. First we need to fetch some masterdata that is needed to trigger the next webservice calls. After the masterdata is available…
1
vote
1 answer

Reactor Mono publish to multiple methods

I have a problem in publishing an object to multiple methods. Simplified version of my code is given below. package org.example.reactive; import lombok.extern.slf4j.Slf4j; import reactor.core.publisher.Mono; import…
Winster
  • 943
  • 10
  • 28
1
vote
1 answer

How do I return a Mono after Flux's onComplete is executed?

I am trying to save a set of categories. When all categories are saved, set the categories of product to it. Then return Product. So far I've managed to do this. public Mono save(Product product) { final Set categories =…
1
vote
1 answer

How to get Payload (io.rsocket.Payload) in Spring Boot @MessageMapping Controller

I am connecting to a Spring Boot RSocket app from RSocket-Java. In the server I have @MessageMapping. how do I access RSocket Payload on Server.
user3549576
  • 99
  • 1
  • 4
  • 17
1
vote
1 answer

How to log RequestBody in async spring controller?

I added an async endpoint to a existing spring-mvc application: @RestController public class MyController { @PostMapping("/") public Mono post(Object body) { return Mono.just("test"); …
membersound
  • 81,582
  • 193
  • 585
  • 1,120
1
vote
3 answers

Schdulers.elastic not creating new threads in Reactor

I am trying to create a flow where a flux emits 10 items, each in parallel, with each item sleeping for 1s. Since each item is being published on a separate thread, I expect the entire process to take 1s. But the logs show that it's taking 10s…
1
vote
1 answer

"Unsatisfied dependency" exception when returning Mono from springframework.data.repository.reactive.ReactiveCrudRepository during pagination

Context: I created succesfully a method with "org.springframework.data.domain.Pageable" parameter aimed to return a Flux. I have only found articles guiding to return a Flux instead of Mono when Pageable is involded. So far so good. Personal…
Jim C
  • 3,957
  • 25
  • 85
  • 162
1
vote
1 answer

Spring WebClient: Retry with WebFlux.fn + reactor-addons

I'm trying to add a conditional Retry for WebClient with Kotlin Coroutines + WebFlux.fn + reactor-addons: suspend fun ClientResponse.asResponse(): ServerResponse = status(statusCode()) .headers { headerConsumer ->…
1 2 3
8 9