Andrea Cosentino created CAMEL-24493:
----------------------------------------

             Summary: camel-ibm-cos: the producer ignores multiPartUpload, 
partSize, storageClass and deleteAfterWrite options
                 Key: CAMEL-24493
                 URL: https://issues.apache.org/jira/browse/CAMEL-24493
             Project: Camel
          Issue Type: Bug
            Reporter: Andrea Cosentino
            Assignee: Andrea Cosentino
             Fix For: 4.23.0


IBMCOSProducer.putObject() builds a plain PutObjectRequest and never reads the 
four producer options declared on IBMCOSConfiguration and advertised in the 
component docs (ibm-cos-component.adoc mentions a multipart upload "if 
multiPartUpload option is enabled" and shows a 
?multiPartUpload=true&partSize=5242880 example):

- multiPartUpload (boolean) + partSize (long, default 25 MB): use multipart 
upload for large payloads
- storageClass (String): storage class for the stored object
- deleteAfterWrite (boolean): delete the local File payload after a successful 
upload

So all four options are silently ignored. Implement them, mirroring 
camel-aws2-s3 AWS2S3Producer (this module was copied from it): apply 
storageClass to the PutObjectRequest, upload via the SDK TransferManager when 
multiPartUpload is enabled (minimum part size / multipart threshold = 
partSize), and delete the File payload after a successful upload when 
deleteAfterWrite is set. The IBM COS SDK (com.ibm.cloud.objectstorage, 
ibm-cos-java-sdk 2.14.x) provides TransferManager and 
PutObjectRequest.withStorageClass.

Affected: components/camel-ibm/camel-ibm-cos 
(org.apache.camel.component.ibm.cos.IBMCOSProducer).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to