I have two spring boot services names A and B.
Problem Area
Is it possible to send the complete InputStream of multipart to service B, so that service A doesn't load the file as well as chunk the file over http/...(any other way)
(One way I had solved it to use fifo on the underlying linux platform and service A is writing continuously on a pipe and Service B is reading) - was looking someway to achieve it with http if possible.
Background - I want Service B to be in control of how much chunk they want and not Service A. It is because of the operation Service B perform - service B adds some additional bytes, so that when the reverse operation is performed on next data, it can see these additional bytes to understand how much more chunk should be read.
UPDATE OF THE GITHUB I am not sure where I am getting it wrong? I pasted the complete project - https://github.com/robin-carry/large-data-transfer
The main files on client/server where all logic is below / README.md explains everything I am trying/failing to do...
client/src/main/java/com/lockdown/lazy/client/controller/UploadController.java server/src/main/java/com/lockdown/lazy/server/controller/OpServiceController.java
Apache Http Client documentation talks about Request/Response entity streaming - see if that helps solve your scenario.
You can design interface with org.springframework.web.multipart.MultipartFile as argument, then- use it as feign client on sender side and implement it in controller on receiver side
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.