Questions tagged [reactor-netty]

Reactor over the Netty client server framework

500 questions
37
votes
2 answers

How to make reactive webclient follow 3XX-redirects?

I have created a basic REST controller which makes requests using the reactive Webclient in Spring-boot 2 using netty. @RestController @RequestMapping("/test") @Log4j2 public class TestController { private WebClient client; @PostConstruct …
31
votes
10 answers

How to set a timeout in Spring 5 WebFlux WebClient

I'm trying to set timeout on my WebClient, here is the current code : SslContext sslContext = SslContextBuilder.forClient().trustManager(InsecureTrustManagerFactory.INSTANCE).build(); ClientHttpConnector httpConnector = new…
Seb
  • 3,602
  • 8
  • 36
  • 52
25
votes
3 answers

Zip Three Different Mono of Different Type

I have started a new project using Spring Webflux and I am fairly new to this reactive coding paradigm. So apologies in advance for questioning like newbies. My controller method returns the response as Mono> and I have three…
bivrantoshakil
  • 421
  • 1
  • 5
  • 10
19
votes
2 answers

Configure HostnameVerifier with reactor netty for spring-webflux WebClient

I'm trying to configure spring-webflux WebClient (with reactor netty under the hood) with ssl and client hostname verification. I'm provided with javax.net.ssl.SSLContext, HostnameVerifier and a list of trusted hostnames (as string list). So far…
Gosia
  • 233
  • 2
  • 8
18
votes
1 answer

Is it wise to create Webclient again and again in Webflux since my base URI is not fixed?

In my MicroService I have to fetch data from places. Some of the URL's are fixed but some are not . So do I need to create WebClient again and again if my base URL changes. If not then is the below way correct to create…
naval jain
  • 353
  • 3
  • 4
  • 14
15
votes
1 answer

Springboot webflux reactor concurrency model

I'd like to understand more about the underlying concurrency model for the springboot webflux? For CPU intense webservice, is the traditonal Blocking Multithreaded model a better fit? Or is it in general traditional thread pool model a better fit…
ethan
  • 1,881
  • 2
  • 17
  • 31
14
votes
1 answer

When to use Mono> and when Flux for RestController method
I'm using Spring web-flux with Reactor and for me is not clear when RestController method should return Mono > and when Flux. Could you provide some case when to use each of them?
13
votes
2 answers

Looking for an alternative of retryWhen which is now Deprecated

I'm facing an issue with WebClient and reactor-extra. Indeed, I have the following method : public Employee getEmployee(String employeeId) { return webClient.get() .uri(FIND_EMPLOYEE_BY_ID_URL, employeeId) …
12
votes
1 answer

Decode content-encoding gzip using Spring WebClient

I am calling a web service using Spring WebClient (Spring 5.1.3). The service responds with content-type: application/json and content-encoding: gzip ClientResponse.bodyToMono then fails with the error "JSON decoding error: Illegal character…
athom
  • 1,428
  • 4
  • 13
  • 26
12
votes
2 answers

Open connections via Spring Websocket STOMP cause our server to die

So we use Spring websocket STOMP + RabbitMQ on the backend and we are having troubles with the open file descriptors. After a certain time, we hit the limit on the server and the server does not accept any connections, including both websockets and…
leventunver
  • 3,269
  • 7
  • 24
  • 39
12
votes
3 answers

Spring WebFlux: Only one connection receive subscriber allowed

I am writing a simple app with Spring 5 Webflux and Kotlin. I am trying to implement PUT endpoint in a following way: PUT("/confs/{id}", { val id = it.pathVariable("id") ServerResponse.ok().body(service.save(it.bodyToMono(Item::class.java)),…
12
votes
3 answers

Readable debug logging for http requests with spring webclient

I'm using Spring reactive WebClient for sending requests to a http server. Inorder to view the underlying request & response that's being sent, I enabled debug logging for reactor.ipc.netty package. The headers for the outgoing requests can be…
Ashok Koyi
  • 5,327
  • 8
  • 41
  • 50
10
votes
1 answer

Facing issue "WebClientRequestException: Pending acquire queue has reached its maximum size of 1000" with spring reactive webClient

I am running load of a microservice API, which involves calling other microservice API using Spring Reactive Webclient. I am using Postman runner tab to test this. Firstly, i run the load with 1500 iteration, second microservice is getting called…
rajat behl
  • 151
  • 1
  • 1
  • 6
9
votes
2 answers

Netty HttpClient - response timeout vs. read timeout

HttpClient from offers various "timeouts" to be configured, two slightly confuses me: responseTimeout: This is time that takes to receive a response after sending a request ReadTimeoutHandler: Raises a ReadTimeoutException when no data was read…
asceta
  • 272
  • 1
  • 4
  • 10
9
votes
1 answer

Reactive Redis (Lettuce) always publishing to single thread

Im using Spring Webflux (with spring-reactor-netty) 2.1.0.RC1 and Lettuce 5.1.1.RELEASE. When I invoke any Redis operation using the Reactive Lettuce API the execution always switches to the same individual thread (lettuce-nioEventLoop-4-1). That is…
Champz
  • 95
  • 1
  • 6
1
2 3
33 34