saranyaeu2987 commented on issue #282:
URL: 
https://github.com/apache/camel-kafka-connector/issues/282#issuecomment-646693207


   @oscerd 
   
   Do you mean something like below ?
   
   ```
   public class CustomS3Client implements S3Client{
       private static Logger log = 
LoggerFactory.getLogger(customS3Client.class);
       Region region = Region.US_EAST_1;
       S3Client s3;
       public CustomS3Client() {
           this.s3 = S3Client.builder() .region(region) 
.credentialsProvider(EnvironmentVariableCredentialsProvider.create()).build();;
       }
   
       @Override
       public String serviceName() {
           return "S3 Client with Env variable Auth";
       }
   
       @Override
       public void close() {
   
       }
       public static void main(String args[]){
           CustomS3Client customs3Client = new CustomS3Client();
           log.info("customs3Client created!");
       }
   }
   
   ```
   
   and  in kafkaconnector.yaml
   
   ```
   apiVersion: kafka.strimzi.io/v1alpha1
   kind: KafkaConnector
   metadata:
     name: heb-s3-abcd-connector
     labels:
       strimzi.io/cluster: emd-kafka-cluster
   spec:
     class: org.apache.camel.kafkaconnector.CamelSinkConnector
     tasksMax: 1
     config:
       key.converter: org.apache.kafka.connect.storage.StringConverter
       value.converter: org.apache.kafka.connect.storage.StringConverter
       topics: DB.EMD.COMPANY.0
       camel.sink.url: 
aws2-s3://test1232?keyName=s3-connect/${date:now:yyyyMMdd}/${date:now:yyyyMMdd-HHmmssSSS}
       camel.component.aws2-s3.configuration.autocloseBody: false
    camel.sink.endpoint.amazonS3Client 
=#class:org.apache.camel.kafkaconnector.CustomS3Client. <-- class will be added 
in org.apache.camel.kafkaconnector
   
   
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to