Questions tagged [spring-webflux]

Spring Framework 5 includes a new spring-webflux module. The module contains support for reactive HTTP and WebSocket clients as well as for reactive server web applications including REST, HTML browser, and WebSocket style interactions. WebFlux can run on Servlet containers with support for the Servlet 3.1 non-blocking I/O API as well as on other async runtimes such as Netty and Undertow.

Questions tagged spring-webflux should be about applications using the Spring WebFlux framework.

If Spring Boot is involved, please also tag the question with spring-boot. If the question is related to the use of Reactor operators, please tag the question with project-reactor as well.

For Spring WebFlux related documentation, please refer to the:

6050 questions
2
votes
0 answers

Simultaneous calls block server

We have a service that is slow to respond for an average of 2 seconds whatever payload we send. We are batching multiple requests to save some bandwidth and don't choke that service. I have this client around WebClient to collect and execute…
2
votes
0 answers

webflux lots of boundedElastic-evictor TIMED_WAITING

I send request to webflux demo server. use springboot version 2.4.1 ,I can not find reason why create so many boundedElastic-evictor thread and always keep timed waiting status. ab -n 10000 -c 1000 -T "application/x-www-form-urlencoded" -p test.txt…
Justubborn
  • 21
  • 2
2
votes
1 answer

how spring WebClient can receive stream data from spring webflux server that is using http/1.1

I have a spring webFlux server and I haven't activated the SSL for it and it's using HTTP/1.1 for request connection. on the other hand wrote a spring WebClient in another application that calls this server just fine and receive stream data as…
Mina Kh
  • 127
  • 1
  • 12
2
votes
1 answer

How can I use StepVerifier instead of block() in tests where I need to store output of reactive code?

When I write tests that verify reactive components I usually use the StepVerifier with the following pattern: StepVerifier.create(...) .assertNext(...) ... .verifyComplete(); This approach works nice but sometimes it is necessary to grab the…
fyrkov
  • 2,245
  • 16
  • 41
2
votes
1 answer

Webclient : java.lang.OutOfMemoryError: Direct buffer memory

I am getting java.lang.OutOfMemoryError: Direct buffer memory error at the web client. The batch job runs daily. It fails twice then passed in the third attempt. at org.springframework.retry.support.RetryTemplate.rethrow(RetryTemplate.java:532)…
Chandresh Mishra
  • 1,081
  • 3
  • 24
  • 45
2
votes
1 answer

Persist objects in db using reactive programming and JPA respository

I am using web flux in my project and am trying to do simple CRUD operations using JPA repository. However I' unable to persist the object in the DB. The object is always being persisted with null values instead in the DB. Please help. Thanks in…
wazza
  • 173
  • 5
  • 15
2
votes
0 answers

Spring WebFlux webclient async parallel calls

I am new to WebFlux and learning and understanding the concepts. I am just playing around with the parallel calls and merging them. I want to make parallel calls (20-25 times) to one REST endpoint and consume the responses and make a list of…
hte_guy
  • 31
  • 5
2
votes
1 answer

Aspect Not Running | Spring-Boot

I have written a jar which contains an Aspect, Please find the classes and xml below:- package com.foo.bar; @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface APILock { int lockAtMostFor() ; int…
Kumar-Sandeep
  • 202
  • 1
  • 4
  • 14
2
votes
0 answers

Why WebFlux doesn't return value immediately as it was produced

As I understand, when Spring WebFlux should return the Flux of values, it would print and send values immediately as it was produced. But I have done some tests, and it returns all values only when all are produced (example code is below). Am I…
2
votes
1 answer

How to wait until List>> finishes?

It's my first time working with webClient and I am wondering how to wait until List> finishes. I have the following code: List
addresses = collectAllAddresses(someObject); List>> monoResponses = …
Nick
  • 117
  • 1
  • 10
2
votes
0 answers

Dynamically change uri() method's value in spring-cloud-gateway

Is it possible to somehow dynamically change the value of the uri() method in spring-cloud-gateway? I have this method: private Function walletRoute(String server, String path, String…
2
votes
0 answers

Spring Webflux: There is any way to modify a controller response?

When a POST request is made to an endpoint controller, this one creates an object on the database and responds with a Mono>. But before sending back the response to the client, the objects successfully created on the database…
Fran b
  • 3,016
  • 6
  • 38
  • 65
2
votes
0 answers

Spring WebSession Redis Exception

I want to store my WebSession in Redis. There is no problem at put operation, but it throws exception when retrieving stored record. Here is my example stack trace Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Unexpected…
2
votes
1 answer

Why spring-webflux application is running on tomcat as default, instead of netty?

I created a Spring-webflux project using below pom.xml but when I am starting the application, it's starting on Tomcat. Shouldn't it start default on Netty?
The Coder
  • 3,447
  • 7
  • 46
  • 81