Hello,
I am attempting to stream a large HTTP request between my Vert.x services. For this purpose, I am using io.vertx.reactivex.ext.web.client.WebClient (created with HttpEndpoint.rxGetWebClient(serviceDiscovery, rec ->rec.getName().equals(serviceName), webClientOptions)), which takes a Flowable as input for the rxSendStream method.
The Flowable in question is based on a ReplaySubject populated with buffers generated by another method.
However, I have encountered an issue where the other service does not receive all the buffers. Specifically:
The HTTP request appears to emit a certain number of buffers and then blocks, leaving the request incomplete.
On the consumer side, fewer buffers are received than expected, and the process becomes stuck without completing the request.
I have tested the behavior with Flowable directly (without using ReplaySubject), and the result appears to be the same.
Could this issue be related to how WebClient handles backpressure? Is it possible that the backpressure handling mechanism is causing the request to block?
I am using the following snipets of the code :
```
var subject = ReplaySubject.<Buffer>create(); var flowableStream = subject.toFlowable(BackpressureStrategy.BUFFER);
...
var request = webClient.put(SERVICE_PATH) .putHeader(CONTENT_TYPE.toString(),APPLICATION_JSON);
setOptionalParameters(httpServerRequest, request); return
request.as(BodyCodec.buffer()) .expect(RESPONSE_CREATED_PREDICATE).rxSendStream(flowableStream).ignoreElement().doOnComplete(() -> LOG.info("executed successfully"));
...
subject.onNext(...)
```
thank you for any help
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/vertx/b2e3e909-4812-43fa-8373-5fc06b8ccd0en%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "vert.x" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vertx/jOLlv7Pl23g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vertx+un...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/vertx/CACiEr_QpRTW9-DxxUJyLukO7u3cH06fYA74cdhwpA%3DrzLgQHMA%40mail.gmail.com.
To view this discussion, visit https://groups.google.com/d/msgid/vertx/bc355b94-23dc-43ce-afb1-df4f76113727n%40googlegroups.com.