此 Kubernetes 部署文件中使用的DateTime 占位符(${date:now:yyyyMMdd-HHmmssSSS}未解析。而 ${file:} 已解析。
apiVersion: kafka.strimzi.io/v1alpha1
kind: KafkaConnector
metadata:
name: s3-sink-connector
labels:
strimzi.io/cluster: my-connect-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: my-replicated-topic
camel.sink.url: aws-s3://kafka-s3?keyName=s3-connect/${date:now:yyyyMMdd-HHmmssSSS} <-- NOT RESOLVED
camel.component.aws-s3.configuration.autocloseBody: false
camel.component.aws-s3.accessKey: ${file:/opt/kafka/external-configuration/aws-credentials/aws-credentials.properties:aws_access_key_id} <-- RESOLVED
camel.component.aws-s3.secretKey: ${file:/opt/kafka/external-configuration/aws-credentials/aws-credentials.properties:aws_secret_access_key} <-- RESOLVED
我在本文档中看到了 ${date:now:yyyyMMdd} 和 exchangeId ( https://camel.apache.org/components/latest/languages/simple-language.html )