HTTP response with Flux has missing closing array #8425
Unanswered
stefanos-kalantzis
asked this question in
Q&A
Replies: 1 comment 7 replies
-
do you know if Publisher.onComplete is being called? if so, this just sounds like a bug, and you can transform this to an issue. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have the following HTTP endpoint:
The service is eventually calling a Cassandra DB, which returns a
MappedReactiveResultSet
, which implementsPublisher
.I'm experiencing an inconsistent problem, that 1 every 20 requests (not precisely) the response does not contain the closing array character
]
.So, instead of
[{...}]
the client gets[{...}
.Of course, since this is a
Flux
response, there is noContent-Length
header in the response, butTransfer-Encoding: chunked
instead.I did a wireshark capture, and indeed in the cases of the missing
]
, the response ends with a0
right after the last}
.Maybe interesting, is that in the cases that it does work, the
]
is sent in a new TCP packet, as a single extra byte. So the TCP trace in the working case, looks like:So, my question is in which direction should I investigate this further, and how. I don't know where the problem could be (Reactor, Micronaut, Cassandra, ?). What nature of problem could cause this?
I will create a demo repository if needed, but I wanted to ask first, maybe there's something obvious for people more versed in the reactive world.
Of course, if I change the HTTP response to
Mono<List<ResourceDto>>
, then it changes to aContent-Length
mode, and it works consistently correctly.Beta Was this translation helpful? Give feedback.
All reactions