Skip to content

Latest commit

 

History

History
36 lines (21 loc) · 2 KB

File metadata and controls

36 lines (21 loc) · 2 KB

AWS S3 Supplier

This module provides an S3 supplier that can be reused and composed in other applications. The Supplier uses the AWS S3 support provided by Spring Integration and spring cloud aws project S3Supplier is implemented as a java.util.function.Supplier. This supplier gives you a reactive stream of files from the provided directory as the supplier has a signature of Supplier<Flux<Message<?>>>. Users have to subscribe to this Flux and receive the data.

Beans for injection

The AwsS3SupplierConfiguration auto-configuration provides the following bean:

s3Supplier

You need to inject this as Supplier<Flux<Message<?>>>.

You can use s3Supplier as a qualifier when injecting.

Once injected, you can use the get method of the Supplier to invoke it and then subscribe to the returned Flux.

Configuration Options

All configuration properties are prefixed with s3.supplier. There are also properties that need to be used with the prefix s3.common and file.consumer.

For more information on the various options available, please see AwsS3SupplierProperties, FileConsumerProperties, and io.awspring.cloud.autoconfigure.s3.properties.S3Properties from Spring Cloud AWS auto-configuration.

A ComponentCustomizer<S3InboundFileSynchronizingMessageSource> bean can be added in the target project to provide any custom options for the S3InboundFileSynchronizingMessageSource configuration used by the s3Supplier.

Tests

See this test suite for the various ways, this supplier is used.

Other usage

See this README where this supplier is used to create a Spring Cloud Stream application where it makes an AWS S3 Source.