Problem is describe on stackoverflow page Question # 65262031
- There is a
clientproject which receives Multipart File - The client project uses the
HttpClient&RequestEntityto push data in chunk directly toOutputStream - There is a
serverproject which works with HttpServletRequest/Response (each having it own stream) serverproject has to kind of opertionop1andop2
For running any of the op1 or op2 operation use the postman configuration given in postman.json
- Injects a 16bytes of random data into the response stream
- Reads data in chunk and count the size (even though it is the same - in actual project it will change after some business operation is perform - it is skipped to avoid complexity)
- Put the count of size in the response stream
- Put the chunk data in the response stream
On the client size the response received is then written into a temp-folder.
- The file generated in the
temp-folderis sent to theclientwhich sends it over in chunk toserver serveris now reversing the process done byop1-- Stripes the initial 16bytes -- Reads the next 6 bytes to find out the length of next bytes to be read -- Reads the bytes as identified in the previous step.
- Unable to understand if Spring WebFlux can solve this problem?
- For smaller file
op1works, but for large files it get stuckop2- somehow something is wrong with streams internally, but can't pinpoint it. See below images op2doesn't work for any of the scenarios (smaller file or larger files)

