Questions tagged [spring-reactive]
128 questions
1
vote
0 answers
How to unit test infinite Flux Stream created in controller for timing in Spring Web-Flux Unit Test for controller
Is there any way to test infinite flux stream created in controller method using VirualTimeScheduler/ or any other means to test . e,g, i have following code in RestController
final String[] names = new String []{"Shailesh", "Josh", "Loredana",…

Shailesh Vaishampayan
- 1,766
- 5
- 24
- 52
1
vote
0 answers
rxjava2-jdbc : Iterating over a toIterable() is blocking, which is not supported in thread reactor-http-nio-2"
I'm making a reactive/flux/mono rest service. Backend is Oracle, and using rxjava2-jdbc.
How to get past this blocking error?
I'm learning rx by example, so would be great to know the conceptual details that prevents list manipulation which feels…

Espresso
- 5,378
- 4
- 35
- 66
1
vote
0 answers
Spring rest docs using webTestClient with StepVerifier (Reactive endpoints)
I am trying to create unit tests for my controllers using webTestClient. I need to generate api documentation using Spring rest docs. I used to create my assets using StepVerifier (Endpoints returning Mono of Flux)
Is there anyway of using…

CRISTIAN ROMERO MATESANZ
- 1,502
- 3
- 14
- 26
1
vote
1 answer
WebClient builder call from one microservice to another microservice giving bad request error for first time in Webflux
We are making use of WebClient Builder call for communication among micro services in our project.It's springboot-thymleaf-webflux based application.Everything is running fine till now but we got a requirement from Client to change GET call to POST…

Manuj Sangwan
- 35
- 3
1
vote
1 answer
Spring Reactor - consuming Pageable endpoint
It's my first time working with Spring Reactor and I've faced the following challenge:
I have a service which allows to consume a number of records specified by page number and page size:
Mono…

Andrey Yaskulsky
- 2,458
- 9
- 39
- 81
1
vote
0 answers
How to send a GET request using Angular 8 and how to handle the incoming APPLICATION_STREAM_JSON_VALUE response
I'm exposing an end-point using Spring Boot and Webflux that returns an infinite stream of numbers, one every one second:
@GetMapping(value = "/infinitestreamflux", produces = MediaType.APPLICATION_STREAM_JSON_VALUE)
@CrossOrigin(origins =…

Capitano Giovarco
- 157
- 1
- 11
1
vote
0 answers
Spring reactive security with basic authentication for rest api
I'm having problems with Spring Security Reactive + basic authentication + rest api + react redux.
I'm trying to implement authentication from the react (client side). In case of correct username and password its working properly. But if case of…

shoaib
- 175
- 1
- 3
- 15
1
vote
2 answers
Using Mono in Spring to populate a Cloud Firestore entity
I am using spring-cloud-gcp-starter-data-firestore for accessing Google Cloud Firestore in my Java Spring application.
Currently, my entity looks like this:
public class Subscription {
public String userId;
public String companyId;
//…

Harold L. Brown
- 8,423
- 11
- 57
- 109
1
vote
0 answers
Limit max threads while using ParallelFlux
How can i limit threads for task, that being executed in parallel? The issue is simple - while my scheduler working, i can't do anything else (fetch some info using postman etc). Is there any way to solve this problem?
Also, i've tryed to set…

SageFreke
- 13
- 5
1
vote
1 answer
spring data reactive mongodb: How to retrieve generated IDs after failed insertAll()
I'm trying to insert java objects from a Flux and generate responses per object, either successful or unsuccessful. Basically the code looks like:
private ReactiveMongoTemplate mongoTemplate;
public Flux…

Turan Yüksel
- 131
- 8
1
vote
0 answers
Generating CSV with Spring reactive webflux
I have an endpoint that should generate a CSV report with a stream. I implemented the endpoint like this:
@GetMapping(value = "/sessions/csv")
public Flux getCsv() {
return csvService.exportToCsv();
}
Now I'm getting…

Yuval
- 764
- 1
- 9
- 23
1
vote
2 answers
How to decompress gzipped content in spring reactive?
While migrating my spring server from servlets to reactive I had to change all the filters in the code to WebFilter. One of the filters was decompressing gzipped content, but I couldn't do the same with the new WebFilter.
With servlets I wrapped the…

Yuval
- 764
- 1
- 9
- 23
1
vote
1 answer
Spring Boot OAuth Ressource Server Proxy Configuration
I am currently struggeling using a proxy in combination with Spring-Webflux. In other services I always followed this approach, which worked perfectly (proxy configuration is retrieved from standard environment variables):
@Bean
public RestTemplate…

SebastianK
- 712
- 4
- 19
1
vote
1 answer
Reactor: Flux
I have a function: Flux queryPerson() which queries database to generate the objects and return them in Flux. When I use .subscribe(), the app just run thru the code and exit. It doesn't wait for the results to come back for the query. But when I…

topcan5
- 1,511
- 8
- 30
- 54
1
vote
0 answers
HttpSessionBindingListener equivalent for reactive WebSession
What is or how to get notified when a WebSession has the equivalent of the HttpSessionBindingListener valueBound(HttpSessionBindingEvent event) or valueUnbound(HttpSessionBindingEvent event) for reactive netty server.
Cant seem to find anything on…

user2205382
- 31
- 4