我有一个spring boot应用程序,我尝试使用单个S3出站适配器将一个文件放入多个S3存储桶中。
我想知道是否有可能使用spring-integration-aws本身使用单个出站适配器将文件放入多个存储桶中(不使用亚马逊网络服务-sdk)
任何建议都会有帮助。
S3 :出站适配器:
<int-aws:s3-outbound-channel-adapter id="filesS3Mover"
channel="filesS3MoverChannel"
transfer-manager="transferManager"
bucket="${aws.s3.target.bucket}"
key-expression="headers.targetsystem-folder/headers.file_name"
command="UPLOAD">
</int-aws:s3-outbound-channel-adapter>发布于 2018-10-24 22:55:49
不,使用这样的通道适配器不可能一次发送到多个存储桶。这不是它的责任。
你可以有一个:
<xsd:attribute name="bucket-expression">
<xsd:annotation>
<xsd:documentation>
A SpEL expression to evaluate S3 bucket at runtime against request message.
Mutually exclusive with 'bucket'.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>但是,为了在运行时根据消息确定它,并在<int-aws:s3-outbound-channel-adapter>前面有一个循环,以便在每次迭代时修改一些消息头,并将所有消息一次又一次地发送到相同的通道。
https://stackoverflow.com/questions/52964035
复制相似问题