![](/img/trans.png)
[英]How to send the contents of a file downloaded from aws s3 using apache camel in json format?
[英]Logging filename during file transfer from aws s3 using apache camel
我是Apache骆驼的初学者。 我正在编写一个程序,使用Apache骆驼将文件从一个AWS S3存储桶传输到另一个存储桶。 现在,我要记录从s3中选取的文件/对象名称。 您能帮我吗? 以下是我的代码段。 $ {file:name}适用于骆驼FTP组件,想了解其等效于AWS的情况。
from("aws-s3://sourceBucket?amazonS3Client=#amazonS3Client")
.log("The following file has been picked for file transfer : ${file:name}")
.routeId("Test My Files").log("Building Destination URI for fie transfer")
.to("aws-s3://destinationBucket?amazonS3Client=#amazonS3Client")
.log("The following file transfer has completed : ${file:name}");
亲切的问候,Kashif
不,不一样。
您需要使用标题CamelAwsS3Key
.log("The following file has been picked for file transfer: ${header.CamelAwsS3Key}")
从S3 Bucket消费时设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.