Trying to post very large files to a REST endpoint I breached netty's data buffer 264k limit. Can you control the size of the chunks sent (e.g. 'buffer' it) both to reduce each message size and reduce the memory footprint needed for the upload. Eventually we'll need to support > 1Gb files.
Here is my current code:
public void upload(final byte[] fileDataBytes) {
webClient.post().uri(uri)
.contentType(MediaType.APPLICATION_OCTET_STREAM)
.accept(APPLICATION_JSON)
.bodyValue(fileDataBytes)
.exchange().block();
I've read that I need to write a producer and consumer but can't see any examples for posts (only gets) and none seem that applicable.