0

How to check in s3-outbound-gateway if the bucket is available in S3 storage before processing using bucket expression. If the bucket is not available, it should be redirected to errorchannel.

   <int-aws:s3-outbound-gateway id="FileGenerationChannelS3"
    request-channel="filesOutS3ChainChannel"
    reply-channel="filesArchiveChannel"
    transfer-manager="transferManager"
    bucket-expression="headers.TARGET_BUCKET"
    command="UPLOAD">
Jessie
  • 963
  • 5
  • 16
  • 26

1 Answers1

1

The <int-aws:s3-outbound-gateway> is a typical MessageHandler-based event-driven consumer. There can be applied an ExpressionEvaluatingRequestHandlerAdvice with a desired failureChannel in the <int-aws:request-handler-advice-chain>.

See Reference Manual for more info.

Artem Bilan
  • 113,505
  • 11
  • 91
  • 118
  • thank you for your reply.. can u suggest some sample code to check if s3 bucket is available? – Jessie Aug 15 '18 at 21:51