I'm working on an issue where I've to pass some data from one spring boot application to another. The data size can range between 10-100MB. I get this byte array data from GCP blob storage as
public byte[] downloadFileFromGCS(String objectName, String bucketName) throws IOException {
val storage = StorageOptions.getDefaultInstance().getService();
val blob = storage.get(BlobId.of(bucketName, objectName));
return blob.getContent();
}
The problem I'm facing is that I've to send it to different spring boot application for some processing, I've tried many different approaches like:
- encoding into base64: which is not working because of huge size of byte files) by sending as Content-type:application/json
- sending directly as byte array (not working because teh byte array values get changed/data loss)
Can someone suggest me what should I do in order to achieve this or any different approach like not sending byte[] array directly but using something different.