1

我想使用参考文档https://ibm-cloud-architecture.github.io/refarch-eda/scenarios/connect-s3/在 kubernetes 中部署 S3 kafka sink 连接器(使用 Apache Camel)

此 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 )

4

1 回答 1

0

如本期所述:https DateTime placeholders ://github.com/apache/camel-kafka-connector/issues/251尚不支持。

他们可能会根据https://github.com/apache/camel-kafka-connector/issues/252

于 2020-05-31T19:44:58.093 回答