【发布时间】:2017-01-31 18:40:30
【问题描述】:
我从 Amazon S3 带来一个文件并使用 Spring Batch 处理它,所有这些都与 Apache Camel 集成。
批处理后,消息体不再是文件内容,而是de Job。但我想将文件移动到另一个 s3 存储桶。如何取回文件内容? (我确实有标题)
(使用 S3 是间接的)
from("aws-s3://my-bucket...")
.idempotentConsumer(header("CamelAwsS3Key"),
MemoryIdempotentRepository.memoryIdempotentRepository(200))
.setHeader("CamelFileName", simple("${in.header.CamelAwsS3Key}"))
.to("file:my-files/")
.log("Copied from S3.")
.to("spring-batch:historicoJob")
.choice()
.when(simple("${in.body.status} == 'COMPLETED'"))
.to("direct:moveIt")
.endChoice();
from("direct:moveIt")
...
.to("aws-s3://done-bucket...");
【问题讨论】:
标签: java amazon-s3 spring-boot apache-camel spring-batch