Questions tagged [reactor-netty]
Reactor over the Netty client server framework
465
questions
0
votes
0
answers
7
views
How to resolve memory Leak in Spring cloud gateway
I am using spring cloud gateway in my service and using below RequestDecorator as a wrapper in my LoggingFilter.
public class RequestDecorator extends ServerHttpRequestDecorator {
private final ...
0
votes
1
answer
22
views
How to monitor meters in Spring Webflux for a reactor-netty server
I am new to Spring Boot and Spring Webflux. I am working on a Spring Webflux reactor-netty server to handle WebSocket connections. In the simplest sense, this is how the server looks like:
...
@...
0
votes
1
answer
44
views
how to read Flux<DataBuffer> content in Reactor
i want to read mulitpart/formdata,one part is application/json。i can`t get them to Map<String,String>, Is there any way to parse Part to String?
private Map<String, String> getFormData(...
-1
votes
0
answers
45
views
How return a default value only on an empty Mono from MongoDB
I'm trying to write a simple algorithm: if no value in db then go to a remote source for it.
I tried do it this way:
public Mono<TicketData> getTicketData(Mono<TicketDataRequest> request) {...
0
votes
0
answers
36
views
Handling netty AbortedException in Spring Boot / coRouter application
I am building a Kotlin Spring Boot Application using coRouter to define routes.
From the frontend I'm sending Web Beacons and I assume some clients/webbrowsers directly close the connection after the ...
-1
votes
0
answers
43
views
TCP server with Reactor Netty, Kotlin and coroutines
I would like to create a TCP server with Kotlin based on Spring reactive netty.
For this purpose I have the following demo project:
<?xml version="1.0" encoding="UTF-8"?>
<...
0
votes
0
answers
42
views
Spring webflux , POST request data is getting truncated intermittently
Request Body sent via Post Method is getting truncated (sometimes) and hence not processed as required.
There is no memory exception thrown or seen in the application logs.
The same request is ...
-1
votes
0
answers
36
views
TCP server with Spring boot reactor netty [duplicate]
How to create a TCP server with spring-boot-starter-reactor-netty using spring auto configuration as much as possible ?
0
votes
0
answers
37
views
Spring Gateway - multiple httpclients in Spring Gateway?
I have many filters that I use to manipulate different requests.
I'm overriding the default netty httpClient provided by Spring Gateway so I can set programatically some sslContext - mTLS in my case. ...
0
votes
0
answers
44
views
How to catch io.netty.handler.timeout.ReadTimeoutException
I am new to WebClient. I would like to handle a io.netty.handler.timeout.ReadTimeoutException thrown from the underlying HTTP client.
This is how I have configured my HttpClient, the one I am passing ...
0
votes
0
answers
9
views
GOAWAY http/2 frame intermittently observed on running high traffic after idleTimeout
While sending the high traffic(same message and payload) we observed some 503 intermittently.
Further we collected tcpdump in the same time interval and observed a GOAWAY http/2 frame sent by netty ...
0
votes
0
answers
30
views
How to get rid of HEX_DUMP in log4j logs coming from "io.netty.handler.logging"
I'm using the dependency that has a dependency on io.netty. I want to get logs from io.netty.handler.logging, so I've created a log4j logger in my app and it seems to be fine.
The only problem is that ...
0
votes
0
answers
111
views
Spring reactive connection prematurely closed BEFORE response reactor netty WebClient HttpClient
WebClient configuration (minimized reproducible use case, tested with different durations, no effect):
public WebClient createWebClient() {
ConnectionProvider provider = ConnectionProvider....
0
votes
0
answers
29
views
How to increase Spring Cloud Gateway throughput without 502 errors
I am running a Spring Cloud Gateway(version 3.0.3) Project with reactor netty(version 2.5.7). My system is with 8 core processor and 16 GB RAM. I have a route which calls the HttpBin API. When i ...
0
votes
0
answers
36
views
Print complete stack trace to debug Connection reset issue
I am new to reactive programming and I am using Webclient to make a call to another web service where I am trying to debug one issue which is coming randomly on testing environment where I can see ...
1
vote
0
answers
62
views
ReactorNettyHttpTracing (deprecated) equivalent in Micrometer Tracing
What would be the equivalent of ReactorNettyHttpTracing (deprecated) in Spring Boot 3 with Micrometer + Brave?
@Bean
public ReactorNettyHttpTracing reactorNettyHttpTracing(HttpTracing httpTracing) {
...
0
votes
1
answer
74
views
Multiple different SSLContext in Webclient from WebFlux
I need to call multiple different API's from my application with WebClient.
Let's say, there are two different API's. For these API's I have to use different SSLContexts that built from different ...
0
votes
0
answers
35
views
Filtering a string URI before parsing in reactor-netty HttpServer
Assume we have dependencies as described here.
pom.xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.projectreactor</groupId>
...
2
votes
1
answer
88
views
Client extract SSL/TLS certificate from a reactor-netty connection
java.net has a simple getServerCertificates in its API (example follows). I was looking for a similar operation in reactor-netty, and if not there, in any other reactive API for spring-boot/webflux/...
0
votes
0
answers
20
views
What is the situation 'header has been sent' when retrying during connection reset error in reactor-netty?
According to the source code and comments of HttpClientConnect.HttpObserver in reactor-netty, it retries to send request to the server when it got connection reset error unless it doesn't have headers ...
0
votes
0
answers
29
views
Is there any way to imlement a rotating proxy based HttpClient in reactor netty?
As per the available examples and documentation, it seems that the way to use a proxy with an http-client is like so:
HttpClient.create()
.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 2_000)
...
0
votes
1
answer
26
views
reactor-netty trailerHeaders not working with body in HttpServerResponse
reactor-netty trailerHeaders not working with body in HttpServerResponse. If send called trailers not passed to client.
If send not called trailers pass to client.
Simple server with send method
...
0
votes
2
answers
165
views
Updating library version, but transitive dependenies stay the same
In order to fix CVE-2022-41881 I want to update the dependency for netty under org.springframework.boot:spring-boot-starter-reactor-netty:jar:2.7.1 from version 1.0.20 to 1.1.1
This is the section of ...
0
votes
1
answer
48
views
Nested Webclient calls is giving an error
Scenario: need to get an access token from a service and pass it to a webclient call as below.
return someservice
.getToken() //returns token as Mono<String>,this itself is ...
0
votes
0
answers
40
views
How to disable HTTP Multiplexing in a Netty Client
I have a Netty HttpClient that is created using the code mentioned below. I wish to disable HTTP2.0 connection multiplexing for this client. How can this be achieved ?
public HttpClient getHttpClient(...
0
votes
1
answer
46
views
Value for HttpClient timeout on a Spring Gateway with resilience4j circuit breaker and time limiter
Should HTTPClient response-timeout be set separately for slow-running calls and separately fast-running calls? Or should it be one timeout value set for all requests?
The application is an Spring ...
0
votes
1
answer
127
views
How to close or reset a http2 stream in Spring boot with embedded Netty server application?
Our application runs on Springboot with embedded Netty server(enabled http2). And it exposes services via Rest Apis.
On Rest Api call, we have a scenario where we wanted to ignore the http2 request ...
2
votes
0
answers
149
views
Spring Cloud Gateway memory leak with non-standart response content-type
We are facing strange memory leak in Spring Cloud Gateway that only appears in one route, that points to a regular Spring Web Rest service that returns response with non standart content-type: "...
0
votes
0
answers
18
views
What happens when we increase the http.maxTotalConnections for an application?
I have been facing the below exception in my application while calling another service. Upon investigation I was told that the waiting time of the requests (waiting to find an open connection), ...
1
vote
1
answer
26
views
How to make sure the previous session.send() is complete before sending more data in reactor-netty WebSocketSession
I am creating a WebSocket Server using spring-webflux and reactor-netty, and on every connection, I get a WebSocketSession (with ReactorNettyWebSocketSession instance). Suppose I store all the ...
0
votes
0
answers
34
views
How to throttle a WebSocket client from sending too many messages in react-netty?
I am trying to build a group chat message using WebSocket using spring-webflux and rector-netty. I am new to reactor-netty framework and even after reading multiple articles posts I couldn't figure ...
0
votes
1
answer
34
views
Sleuth's trace ID in Logbook logs, on reactor netty - howto?
Some time ago, I was looking for a solution to propagate sleuth's trace IDs in zalando's logbook logs and found a solution - #1690, that works.
However, mentioned ReactorNettyHttpTracing is now ...
0
votes
0
answers
40
views
Spring reactor webclient rate limit
I have a springboot webflux application A which need call another web service B. Something like this:
// controller
@Post("/request")
public doRequest(RequestA body) {
...
0
votes
0
answers
79
views
TimeoutException on a WebClient call while using JDK 11
There was an TimeoutException as shown below while using JDK 11 for WebClient:
Caused by: java.util.concurrent.TimeoutException: Did not observe any item or terminal signal within 60000ms in 'source(...
0
votes
0
answers
32
views
Project Reactor TcpServer -> Process incoming chunked message in its entirety
I have a TcpServer created with Project Reactor, where I want to read in a large String (potentially XML) on the inbound channel, and perform some work on it, and send this back out on the outbound ...
1
vote
0
answers
624
views
java.lang.VerifyError: reactor.netty.http.client.HttpClientConfig overrides final method connectionProvider
Getting "reactor.netty.http.client.HttpClientConfig overrides final method connectionProvider" when upgrading the reactor-netty-http version from 1.0.19 to 1.0.24.
using code :
**
@Mock
...
0
votes
0
answers
41
views
How to count CSV rows using Spring-boot netty service
Below is my controller, from postman i will get a csv file so i want to count how many rows i have in that csv file(see the postman snapshot)
@RestController
public class AsyncBatchController {
@...
0
votes
0
answers
31
views
javax.ws.rs.ProcessingException: reactor.netty.ReactorNetty$InternalNettyException: io.netty.util.internal.OutOfDirectMemoryError: failed to allocate
I am seeing reactor.netty.ReactorNetty$InternalNettyException: io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 1056964615, max: 1073741824) ...
0
votes
0
answers
46
views
Do CVEs against netty apply to reactor netty?
My security tool is detecting a reactor netty package and flagging it with a netty CVEs.
Details:
My server has reactor netty v1.0.23 installed (v1.0.23 was released Sep 30, 2022)
My security tool ...
0
votes
0
answers
78
views
How to get sleuth http headers for reactor netty client request via breakpoint?
Given a client request of the form
return webClient.get()
.uri(customersUrl + id)
.retrieve()
.bodyToMono(Customer.class)
.block();
I would like to have a scriptable breakpoint ...
-1
votes
1
answer
95
views
I am getting error "Caused by: java.lang.IllegalArgumentException: "httpclientconf' is already in use"
I am running 2 Java cron jobs(only 1 application but called twice with 2 different job names) at the same time on a Kubernetes pod. Both jobs have http calls to other services.
For example:
java -Djob=...
0
votes
0
answers
41
views
How does one handle XMLFrameDecoder exceptions without closing the connection?
How can one recover from XMLFrameDecoder exceptions without closing the TCPServer connections?
I've thought of a few approaches, but all seem to have issues.
If I derive from XMLFrameDecoder, I can ...
1
vote
0
answers
235
views
SSL Exception Tag mismatch error, with spring webflux webclient requests
I just converted a service to the webflux/netty stack (formerly it was mvc/undertow)
This service makes https requests to downstream services using spring webclient(formerly okHttp client).
The ...
0
votes
1
answer
1k
views
Spring Webclient, The connection observed an error io.netty.handler.ssl.SslClosedEngineException: SSLEngine closed already
To make a call to an external payment gateway from the spring boot application, we are making use of webclient that comes along with webflux.
Stack:
spring-boot-starter-parent 2.5.3
spring-boot-...
0
votes
0
answers
57
views
AWS S3 Client throws "Operator called default onErrorDropped\njava.util.concurrent.CompletionException"
I am using the below AWS S3 AsyncClient from my Spring webflux application.As part of performance testing I had to introduce eventLoopGroup in S3 Client Config below to enable the S3 operations when ...
0
votes
0
answers
479
views
Spring boot - Connection reset by peer under heavy load
We are seeing some errors related to connection reset in Production under heavy load.
Basically the flow is
Microservice 1 -> Load Balancer() -> Microservice 2
Error message is
Stack trace:
...
0
votes
0
answers
31
views
Calling Webclient API call(asynchronous) from mono core environment
can we use webclient API from in mono core environment?
For Example
Func A()
{
while(1)
{
....
// Call webclint API
Client.getWebClient().post().uri(test\_uri)
...
0
votes
1
answer
194
views
Configure connection leasing strategy (fifo/lifo) for httpclient Spring Cloud Gateway
Spring Cloud Gateway provides a way to configure httpclient property like
spring:
application:
cloud:
gateway:
httpclient:
connect-timeout: 1000
response-timeout: 5s
...
0
votes
1
answer
151
views
How do I set MaxConnPerRoute, ConnectionRequestTimeout, keepAliveStrategy in Spring WebFlux WebClient
we have the following custom connection pooling implemented for RestTemplate.
PoolingHttpClientConnectionManager poolingConnManager =
new PoolingHttpClientConnectionManager();
...
0
votes
1
answer
207
views
Project Reactor - ConnectionProvider.evictInBackground()
What is the benefit of using evictInBackground operation on ConnectionProvider which is used with HttpClient.create(connectionProvider) in springboot webflux ?