├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── config.yml │ └── feature_request.md ├── PULL_REQUEST_TEMPLATE.md ├── dco.yml ├── dependabot.yml └── workflows │ ├── announce-milestone-planning.yml │ ├── auto-cherry-pick.yml │ ├── backport-issue.yml │ ├── ci-snapshot.yml │ ├── merge-dependabot-pr.yml │ ├── pr-build.yml │ ├── release.yml │ └── verify-staged-artifacts.yml ├── .gitignore ├── CONTRIBUTING.adoc ├── LICENSE.txt ├── README.adoc ├── build.gradle ├── common ├── spring-aws-s3-common │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── common │ │ │ │ └── aws │ │ │ │ └── s3 │ │ │ │ ├── AmazonS3Configuration.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── common │ │ └── aws │ │ └── s3 │ │ └── AmazonS3ConfigurationTests.java ├── spring-config-common │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── common │ │ │ └── config │ │ │ ├── ComponentCustomizer.java │ │ │ ├── SpelExpressionConverterConfiguration.java │ │ │ └── package-info.java │ │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── spring-debezium-autoconfigure │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── common │ │ │ │ └── debezium │ │ │ │ ├── DebeziumEngineBuilderAutoConfiguration.java │ │ │ │ ├── DebeziumProperties.java │ │ │ │ ├── EmbeddedEngineExecutorService.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── common │ │ └── debezium │ │ ├── DebeziumEngineBuilderAutoConfigurationIntegrationTests.java │ │ ├── DebeziumEngineBuilderAutoConfigurationTests.java │ │ └── DebeziumPropertiesTests.java ├── spring-file-common │ ├── build.gradle │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── common │ │ └── file │ │ ├── FileConsumerProperties.java │ │ ├── FileReadingMode.java │ │ ├── FileUtils.java │ │ ├── package-info.java │ │ └── remote │ │ ├── RemoteFileDeletingAdvice.java │ │ ├── RemoteFileRenamingAdvice.java │ │ └── package-info.java ├── spring-ftp-common │ ├── build.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── common │ │ │ └── ftp │ │ │ ├── FtpSessionFactoryConfiguration.java │ │ │ ├── FtpSessionFactoryProperties.java │ │ │ └── package-info.java │ │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── spring-function-test-support │ ├── build.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── test │ │ │ └── support │ │ │ ├── file │ │ │ └── remote │ │ │ │ ├── RemoteFileTestSupport.java │ │ │ │ └── package-info.java │ │ │ ├── ftp │ │ │ ├── FtpTestSupport.java │ │ │ └── package-info.java │ │ │ ├── mqtt │ │ │ ├── MosquittoContainerTest.java │ │ │ └── package-info.java │ │ │ ├── sftp │ │ │ ├── SftpTestSupport.java │ │ │ └── package-info.java │ │ │ ├── websocket │ │ │ ├── WebsocketConsumerClientHandler.java │ │ │ └── package-info.java │ │ │ └── xmpp │ │ │ ├── XmppTestContainerSupport.java │ │ │ └── package-info.java │ │ └── resources │ │ ├── id_rsa_pp │ │ ├── id_rsa_pp.pub │ │ ├── logback.xml │ │ └── xmpp │ │ └── conf │ │ ├── available-plugins.xml │ │ ├── crowd.properties │ │ ├── openfire-demoboot.xml │ │ ├── openfire.xml │ │ ├── security.xml │ │ ├── security │ │ ├── archive │ │ │ └── readme.txt │ │ ├── client.truststore │ │ ├── keystore │ │ └── truststore │ │ └── server-update.xml ├── spring-metadata-store-common │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── common │ │ │ │ └── metadata │ │ │ │ └── store │ │ │ │ ├── MetadataStoreAutoConfiguration.java │ │ │ │ ├── MetadataStoreProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── common │ │ └── metadata │ │ └── store │ │ └── MetadataStoreAutoConfigurationTests.java ├── spring-mqtt-common │ ├── build.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── common │ │ │ └── mqtt │ │ │ ├── MqttConfiguration.java │ │ │ ├── MqttProperties.java │ │ │ └── package-info.java │ │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── spring-tcp-common │ ├── build.gradle │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── common │ │ └── tcp │ │ ├── EncoderDecoderFactoryBean.java │ │ ├── Encoding.java │ │ ├── TcpConnectionFactoryProperties.java │ │ └── package-info.java ├── spring-twitter-common │ ├── build.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── common │ │ │ └── twitter │ │ │ ├── Cursor.java │ │ │ ├── TwitterConnectionConfiguration.java │ │ │ ├── TwitterConnectionProperties.java │ │ │ ├── package-info.java │ │ │ └── util │ │ │ ├── TwitterTestUtils.java │ │ │ └── package-info.java │ │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports └── spring-xmpp-common │ ├── build.gradle │ └── src │ └── main │ ├── java │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── common │ │ └── xmpp │ │ ├── XmppConnectionFactoryConfiguration.java │ │ ├── XmppConnectionFactoryProperties.java │ │ └── package-info.java │ └── resources │ └── META-INF │ └── spring │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports ├── consumer ├── spring-analytics-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── analytics │ │ │ │ ├── AnalyticsConsumerConfiguration.java │ │ │ │ ├── AnalyticsConsumerProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── consumer │ │ │ ├── analytics │ │ │ ├── AnalyticsConsumerParentTests.java │ │ │ ├── CountWithAmountTests.java │ │ │ ├── EmptyTagsTests.java │ │ │ ├── ExpressionCounterNameTests.java │ │ │ ├── FixedTagsTests.java │ │ │ ├── GaugeWithAmountTests.java │ │ │ ├── LiteralTagExpressionsTests.java │ │ │ ├── NullTagsTests.java │ │ │ └── StockExchangeAnalyticsTests.java │ │ │ └── demo │ │ │ └── StockExchangeAnalyticsExample.java │ │ └── resources │ │ └── data │ │ ├── stock_appl.json │ │ └── stock_vmw.json ├── spring-cassandra-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── cassandra │ │ │ │ ├── CassandraConsumerConfiguration.java │ │ │ │ ├── CassandraConsumerProperties.java │ │ │ │ ├── cluster │ │ │ │ ├── CassandraAppClusterConfiguration.java │ │ │ │ ├── CassandraClusterProperties.java │ │ │ │ ├── TrustAllSSLContextFactory.java │ │ │ │ └── package-info.java │ │ │ │ ├── package-info.java │ │ │ │ └── query │ │ │ │ ├── ColumnNameExtractor.java │ │ │ │ ├── InsertQueryColumnNameExtractor.java │ │ │ │ ├── UpdateQueryColumnNameExtractor.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── consumer │ │ │ └── cassandra │ │ │ ├── CassandraConsumerApplicationTests.java │ │ │ ├── CassandraEntityInsertTests.java │ │ │ ├── CassandraIngestInsertTests.java │ │ │ ├── CassandraIngestNamedParamsTests.java │ │ │ ├── CassandraIngestUpdateTests.java │ │ │ ├── CassandraTestContainer.java │ │ │ └── domain │ │ │ └── Book.java │ │ └── resources │ │ └── init-db.cql ├── spring-elasticsearch-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── elasticsearch │ │ │ │ ├── ElasticsearchConsumerConfiguration.java │ │ │ │ ├── ElasticsearchConsumerProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── consumer │ │ │ └── elasticsearch │ │ │ └── ElasticsearchConsumerApplicationTests.java │ │ └── resources │ │ └── logback.xml ├── spring-file-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── file │ │ │ │ ├── FileConsumerConfiguration.java │ │ │ │ ├── FileConsumerProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── consumer │ │ └── file │ │ ├── AbstractFileConsumerTests.java │ │ ├── BinaryFileTests.java │ │ ├── ExpressionTests.java │ │ └── TextFileTests.java ├── spring-ftp-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── ftp │ │ │ │ ├── FtpConsumerConfiguration.java │ │ │ │ ├── FtpConsumerProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── consumer │ │ └── ftp │ │ ├── FtpConsumerPropertiesTests.java │ │ └── FtpConsumerTests.java ├── spring-jdbc-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── jdbc │ │ │ │ ├── DefaultInitializationScriptResource.java │ │ │ │ ├── JdbcConsumerConfiguration.java │ │ │ │ ├── JdbcConsumerProperties.java │ │ │ │ ├── ShorthandMapConverter.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── consumer │ │ │ └── jdbc │ │ │ ├── BatchInsertTimeoutTests.java │ │ │ ├── DataReceivedAsByteArrayTests.java │ │ │ ├── ExplicitTableCreationTests.java │ │ │ ├── HeaderInsertTests.java │ │ │ ├── ImplicitTableCreationTests.java │ │ │ ├── JdbcConsumerApplicationTests.java │ │ │ ├── JsonStringPayloadInsertTests.java │ │ │ ├── MapPayloadInsertTests.java │ │ │ ├── SimpleBatchInsertTests.java │ │ │ ├── SimpleInsertTests.java │ │ │ ├── SimpleMappingTests.java │ │ │ ├── SpELTests.java │ │ │ ├── UnqualifiableColumnExpressionTests.java │ │ │ └── VaryingInsertTests.java │ │ └── resources │ │ ├── explicit-script.sql │ │ └── schema.sql ├── spring-kafka-publisher │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── kafka │ │ │ │ ├── KafkaPublisherConfiguration.java │ │ │ │ ├── KafkaPublisherProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── consumer │ │ └── kafka │ │ └── KafkaPublisherConfigurationTests.java ├── spring-log-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── log │ │ │ │ ├── LogConsumerConfiguration.java │ │ │ │ ├── LogConsumerProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── consumer │ │ └── log │ │ └── LogConsumerApplicationTests.java ├── spring-mongodb-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── mongo │ │ │ │ ├── MongoDbConsumerConfiguration.java │ │ │ │ ├── MongoDbConsumerProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── consumer │ │ │ └── mongo │ │ │ ├── MongoDbConsumerApplicationTests.java │ │ │ └── MongoDbTestContainerSupport.java │ │ └── resources │ │ └── logback-test.xml ├── spring-mqtt-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── mqtt │ │ │ │ ├── MqttConsumerConfiguration.java │ │ │ │ ├── MqttConsumerProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── consumer │ │ │ └── mqtt │ │ │ └── MqttConsumerTests.java │ │ └── resources │ │ └── logback.xml ├── spring-rabbit-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── rabbit │ │ │ │ ├── RabbitConsumerConfiguration.java │ │ │ │ ├── RabbitConsumerProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── consumer │ │ └── rabbit │ │ ├── RabbitConsumerTests.java │ │ └── RabbitTestContainer.java ├── spring-redis-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── redis │ │ │ │ ├── RedisConsumerConfiguration.java │ │ │ │ ├── RedisConsumerProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── consumer │ │ └── redis │ │ ├── AbstractRedisConsumerTests.java │ │ ├── RedisConsumerKeyTests.java │ │ ├── RedisConsumerQueueTests.java │ │ ├── RedisConsumerTopicTests.java │ │ └── RedisTestContainerSupport.java ├── spring-rsocket-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── rsocket │ │ │ │ ├── RsocketConsumerConfiguration.java │ │ │ │ ├── RsocketConsumerProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── consumer │ │ └── rsocket │ │ └── RsocketConsumerTests.java ├── spring-s3-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── s3 │ │ │ │ ├── AwsS3ConsumerConfiguration.java │ │ │ │ ├── AwsS3ConsumerProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── consumer │ │ └── s3 │ │ ├── AbstractAwsS3ConsumerMockTests.java │ │ ├── AmazonS3UploadFileTests.java │ │ └── AmazonS3UploadInputStreamTests.java ├── spring-sftp-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── sftp │ │ │ │ ├── SftpConsumerConfiguration.java │ │ │ │ ├── SftpConsumerProperties.java │ │ │ │ ├── SftpConsumerSessionFactoryConfiguration.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── consumer │ │ └── sftp │ │ ├── SftpConsumerPropertiesTests.java │ │ └── SftpConsumerTests.java ├── spring-tcp-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── tcp │ │ │ │ ├── TcpConsumerConfiguration.java │ │ │ │ ├── TcpConsumerProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── consumer │ │ └── tcp │ │ ├── AbstractTcpConsumerTests.java │ │ ├── CRLFTests.java │ │ ├── L1Tests.java │ │ ├── L2Tests.java │ │ ├── L4Tests.java │ │ ├── LFTests.java │ │ ├── NULLTests.java │ │ ├── NotNioTests.java │ │ ├── PropertiesPopulatedTests.java │ │ ├── RAWTests.java │ │ └── STXETXTests.java ├── spring-twitter-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── twitter │ │ │ │ ├── friendship │ │ │ │ ├── TwitterFriendshipsConsumerConfiguration.java │ │ │ │ ├── TwitterFriendshipsConsumerProperties.java │ │ │ │ └── package-info.java │ │ │ │ ├── message │ │ │ │ ├── TwitterMessageConsumerConfiguration.java │ │ │ │ ├── TwitterMessageConsumerProperties.java │ │ │ │ └── package-info.java │ │ │ │ └── status │ │ │ │ └── update │ │ │ │ ├── TwitterUpdateConsumerConfiguration.java │ │ │ │ ├── TwitterUpdateConsumerProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── consumer │ │ └── twitter │ │ └── status │ │ └── update │ │ └── TwitterUpdateConsumerConfigurationTests.java ├── spring-wavefront-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── wavefront │ │ │ │ ├── WavefrontConsumerConfiguration.java │ │ │ │ ├── WavefrontConsumerProperties.java │ │ │ │ ├── WavefrontFormat.java │ │ │ │ ├── package-info.java │ │ │ │ └── service │ │ │ │ ├── DirectConnectionWavefrontService.java │ │ │ │ ├── ProxyConnectionWavefrontService.java │ │ │ │ ├── WavefrontService.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── consumer │ │ └── wavefront │ │ ├── WavefrontConsumerConfigurationTests.java │ │ ├── WavefrontConsumerPropertiesTests.java │ │ ├── WavefrontFormatTests.java │ │ └── service │ │ ├── DirectConnectionWavefrontServiceTests.java │ │ ├── ProxyConnectionWavefrontServiceTests.java │ │ └── WavefrontServiceConditionTests.java ├── spring-websocket-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── websocket │ │ │ │ ├── WebsocketConsumerConfiguration.java │ │ │ │ ├── WebsocketConsumerProperties.java │ │ │ │ ├── WebsocketConsumerServer.java │ │ │ │ ├── WebsocketConsumerServerHandler.java │ │ │ │ ├── WebsocketConsumerServerInitializer.java │ │ │ │ ├── actuator │ │ │ │ ├── WebsocketConsumerTraceEndpoint.java │ │ │ │ └── package-info.java │ │ │ │ ├── package-info.java │ │ │ │ └── trace │ │ │ │ ├── InMemoryTraceRepository.java │ │ │ │ ├── Trace.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── consumer │ │ │ └── websocket │ │ │ └── WebsocketConsumerTests.java │ │ └── resources │ │ └── logback-test.xml ├── spring-xmpp-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── consumer │ │ │ │ └── xmpp │ │ │ │ ├── XmppConsumerConfiguration.java │ │ │ │ ├── XmppConsumerProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── consumer │ │ └── xmpp │ │ └── XmppConsumerConfigurationTests.java └── spring-zeromq-consumer │ ├── README.adoc │ ├── build.gradle │ └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── consumer │ │ │ └── zeromq │ │ │ ├── ZeroMqConsumerConfiguration.java │ │ │ ├── ZeroMqConsumerProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ └── java │ └── org │ └── springframework │ └── cloud │ └── fn │ └── consumer │ └── zeromq │ └── ZeroMqConsumerConfigurationTests.java ├── dependencies.gradle ├── etc └── checkstyle │ ├── checkstyle-suppressions.xml │ └── checkstyle.xml ├── function ├── spring-aggregator-function │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── aggregator │ │ │ │ ├── AggregatorFunctionConfiguration.java │ │ │ │ ├── AggregatorFunctionProperties.java │ │ │ │ ├── ExcludeStoresAutoConfigurationEnvironmentPostProcessor.java │ │ │ │ ├── MessageStoreConfiguration.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ ├── spring.factories │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── aggregator │ │ ├── AbstractAggregatorFunctionTests.java │ │ ├── CustomPropsAndMongoMessageStoreAggregatorTests.java │ │ ├── DefaultAggregatorTests.java │ │ ├── JdbcMessageStoreAggregatorTests.java │ │ └── RedisMessageStoreAggregatorTests.java ├── spring-computer-vision-function │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── computer │ │ │ │ └── vision │ │ │ │ ├── ComputerVisionFunctionConfiguration.java │ │ │ │ ├── ComputerVisionFunctionProperties.java │ │ │ │ ├── JsonHelper.java │ │ │ │ ├── package-info.java │ │ │ │ └── translator │ │ │ │ ├── TensorflowSavedModelObjectDetectionTranslator.java │ │ │ │ ├── TensorflowSavedModelObjectDetectionTranslatorFactory.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── computer │ │ │ └── vision │ │ │ ├── ComputerVisionFunctionConfigurationTests.java │ │ │ └── JsonHelperTests.java │ │ └── resources │ │ ├── amsterdam-cityscape.jpg │ │ ├── karakatschan.jpg │ │ ├── object-detection.jpg │ │ ├── pose.png │ │ └── test1.png ├── spring-filter-function │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── filter │ │ │ │ ├── FilterFunctionConfiguration.java │ │ │ │ ├── FilterFunctionProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── filter │ │ └── FilterFunctionApplicationTests.java ├── spring-header-enricher-function │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── header │ │ │ │ └── enricher │ │ │ │ ├── HeaderEnricherFunctionConfiguration.java │ │ │ │ ├── HeaderEnricherFunctionProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── header │ │ └── enricher │ │ └── HeaderEnricherFunctionApplicationTests.java ├── spring-header-filter-function │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── header │ │ │ │ └── filter │ │ │ │ ├── HeaderFilterFunctionConfiguration.java │ │ │ │ ├── HeaderFilterFunctionProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── header │ │ └── filter │ │ ├── HeaderFilterFunctionApplicationDeleteAllTests.java │ │ ├── HeaderFilterFunctionApplicationTests.java │ │ └── HeaderUtils.java ├── spring-http-request-function │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── http │ │ │ │ └── request │ │ │ │ ├── HttpRequestFunctionConfiguration.java │ │ │ │ ├── HttpRequestFunctionProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── http │ │ └── request │ │ └── HttpRequestFunctionTests.java ├── spring-payload-converter-function │ └── src │ │ ├── main │ │ └── java │ │ │ └── functions │ │ │ ├── ByteArrayTextToString.java │ │ │ ├── JsonBytesToMap.java │ │ │ └── package-info.java │ │ └── test │ │ └── java │ │ └── functions │ │ └── ByteArrayTextToStringTests.java ├── spring-spel-function │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── spel │ │ │ │ ├── SpelFunctionConfiguration.java │ │ │ │ ├── SpelFunctionProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── spel │ │ └── SpelFunctionApplicationTests.java ├── spring-splitter-function │ ├── README.adoc │ ├── build.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── splitter │ │ │ │ ├── SplitterFunctionConfiguration.java │ │ │ │ ├── SplitterFunctionProperties.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── splitter │ │ └── SplitterFunctionApplicationTests.java ├── spring-task-launch-request-function │ ├── README.adoc │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── springframework │ │ │ │ └── cloud │ │ │ │ └── fn │ │ │ │ └── task │ │ │ │ └── launch │ │ │ │ └── request │ │ │ │ ├── CommandLineArgumentsMessageMapper.java │ │ │ │ ├── KeyValueListParser.java │ │ │ │ ├── TaskLaunchRequest.java │ │ │ │ ├── TaskLaunchRequestFunction.java │ │ │ │ ├── TaskLaunchRequestFunctionConfiguration.java │ │ │ │ ├── TaskLaunchRequestFunctionProperties.java │ │ │ │ ├── TaskLaunchRequestMessageProcessor.java │ │ │ │ ├── TaskLaunchRequestSupplier.java │ │ │ │ ├── TaskNameMessageMapper.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ └── java │ │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── task │ │ └── launch │ │ └── request │ │ ├── KeyValueListParserTests.java │ │ ├── TaskLaunchRequestFunctionApplicationTests.java │ │ └── TaskLaunchRequestFunctionPropertiesTests.java └── spring-twitter-function │ ├── README.adoc │ ├── build.gradle │ └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── twitter │ │ │ ├── geo │ │ │ ├── TwitterGeoFunctionConfiguration.java │ │ │ ├── TwitterGeoFunctionProperties.java │ │ │ └── package-info.java │ │ │ ├── trend │ │ │ ├── TwitterTrendFunctionConfiguration.java │ │ │ ├── TwitterTrendFunctionProperties.java │ │ │ └── package-info.java │ │ │ └── users │ │ │ ├── TwitterUsersFunctionConfiguration.java │ │ │ ├── TwitterUsersFunctionProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ ├── java │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── twitter │ │ ├── geo │ │ └── TwitterGeoFunctionTests.java │ │ ├── trend │ │ └── TwitterTrendFunctionTests.java │ │ └── users │ │ └── TwitterUsersFunctionTests.java │ └── resources │ ├── logback.xml │ └── response │ ├── lookup_users_id.json │ ├── search_places_amsterdam.json │ ├── search_users.json │ └── trends.json ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── publish-maven.gradle ├── samples ├── time-spel-log │ ├── README.adoc │ ├── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── settings.gradle │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── TimeSpelLogApplication.java │ │ └── resources │ │ │ └── application.yml │ │ └── test │ │ └── java │ │ └── com │ │ └── example │ │ └── TimeSpelLogApplicationTests.java └── zip-split-rabbit-binder │ ├── README.adoc │ ├── build.gradle │ ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── settings.gradle │ └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── ZipSplitRabbitBinderApplication.java │ └── resources │ │ └── application.yml │ └── test │ ├── java │ └── com │ │ └── example │ │ └── ZipSplitRabbitBinderApplicationTests.java │ └── resources │ └── dirWithZips │ ├── zip1.zip │ └── zip2.zip ├── settings.gradle ├── spring-functions-catalog-bom └── build.gradle └── supplier ├── spring-debezium-supplier ├── README.adoc ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── debezium │ │ │ ├── DebeziumReactiveConsumerConfiguration.java │ │ │ ├── DebeziumSupplierProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ ├── java │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── supplier │ │ └── debezium │ │ └── it │ │ └── supplier │ │ ├── DebeziumReactiveConsumerConfigurationTests.java │ │ ├── DebeziumSupplierIntegrationTests.java │ │ └── TestJdbcTemplateConfiguration.java │ └── resources │ └── logback-test.xml ├── spring-file-supplier ├── README.adoc ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── file │ │ │ ├── FileSupplierConfiguration.java │ │ │ ├── FileSupplierProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ └── java │ └── org │ └── springframework │ └── cloud │ └── fn │ └── supplier │ └── file │ ├── AbstractFileSupplierTests.java │ ├── DefaultFileSupplierTests.java │ ├── FileModeRefTests.java │ ├── FilePayloadWithPatternTests.java │ ├── FilePayloadWithRegexTests.java │ ├── LinesAndMarkersAsJsonPayloadTests.java │ ├── LinesPayloadTests.java │ └── TailModeTests.java ├── spring-ftp-supplier ├── README.adoc ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── ftp │ │ │ ├── FtpSupplierConfiguration.java │ │ │ ├── FtpSupplierProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ └── java │ └── org │ └── springframework │ └── cloud │ └── fn │ └── supplier │ └── ftp │ ├── FtpSupplierPropertiesTests.java │ └── FtpSupplierTests.java ├── spring-http-supplier ├── README.adoc ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── http │ │ │ ├── HttpSupplierConfiguration.java │ │ │ ├── HttpSupplierProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ ├── java │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── supplier │ │ └── http │ │ └── HttpSupplierApplicationTests.java │ └── resources │ └── test.jks ├── spring-jdbc-supplier ├── README.adoc ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── jdbc │ │ │ ├── JdbcSupplierConfiguration.java │ │ │ ├── JdbcSupplierProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ ├── java │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── supplier │ │ └── jdbc │ │ ├── DefaultJdbcSupplierTests.java │ │ └── NonSplitJdbcSupplierTests.java │ └── resources │ └── schema.sql ├── spring-jms-supplier ├── README.adoc ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── jms │ │ │ ├── JmsSupplierConfiguration.java │ │ │ ├── JmsSupplierProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ └── java │ └── org │ └── springframework │ └── cloud │ └── fn │ └── supplier │ └── jms │ ├── AbstractJmsSupplierTests.java │ ├── PropertiesPopulated1Tests.java │ ├── PropertiesPopulated2Tests.java │ └── PropertiesPopulated3Tests.java ├── spring-kafka-supplier ├── README.adoc ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── kafka │ │ │ ├── KafkaSupplierConfiguration.java │ │ │ ├── KafkaSupplierProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ └── java │ └── org │ └── springframework │ └── cloud │ └── fn │ └── supplier │ └── kafka │ └── KafkaSupplierTests.java ├── spring-mail-supplier ├── README.adoc ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── mail │ │ │ ├── MailSupplierConfiguration.java │ │ │ ├── MailSupplierProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ └── java │ └── org │ └── springframework │ └── cloud │ └── fn │ └── supplier │ └── mail │ ├── AbstractMailSupplierTests.java │ ├── ImapIdlePassTests.java │ ├── ImapPassTests.java │ └── Pop3PassTests.java ├── spring-mongodb-supplier ├── README.adoc ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── mongo │ │ │ ├── MongodbSupplierConfiguration.java │ │ │ ├── MongodbSupplierProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ └── java │ └── org │ └── springframework │ └── cloud │ └── fn │ └── supplier │ └── mongo │ └── MongodbSupplierApplicationTests.java ├── spring-mqtt-supplier ├── README.adoc ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── mqtt │ │ │ ├── MqttSupplierConfiguration.java │ │ │ ├── MqttSupplierProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ ├── java │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── supplier │ │ └── mqtt │ │ └── MqttSupplierTests.java │ └── resources │ └── logback.xml ├── spring-rabbit-supplier ├── README.adoc ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── rabbit │ │ │ ├── RabbitSupplierConfiguration.java │ │ │ ├── RabbitSupplierProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ └── java │ └── org │ └── springframework │ └── cloud │ └── fn │ └── supplier │ └── rabbit │ └── RabbitSupplierTests.java ├── spring-s3-supplier ├── README.adoc ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── s3 │ │ │ ├── AwsS3SupplierConfiguration.java │ │ │ ├── AwsS3SupplierProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ └── java │ └── org │ └── springframework │ └── cloud │ └── fn │ └── supplier │ └── s3 │ ├── AbstractAwsS3SupplierMockTests.java │ ├── AmazonS3FilesTransferredTests.java │ ├── AmazonS3LinesTransferredTests.java │ └── AmazonS3ListOnlyTests.java ├── spring-sftp-supplier ├── README.adoc ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── sftp │ │ │ ├── SftpSupplierConfiguration.java │ │ │ ├── SftpSupplierFactoryConfiguration.java │ │ │ ├── SftpSupplierProperties.java │ │ │ ├── SftpSupplierRotator.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ ├── java │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── supplier │ │ └── sftp │ │ └── SftpSupplierApplicationTests.java │ └── resources │ └── logback.xml ├── spring-syslog-supplier ├── README.adoc ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── syslog │ │ │ ├── SyslogSupplierConfiguration.java │ │ │ ├── SyslogSupplierProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ └── java │ └── org │ └── springframework │ └── cloud │ └── fn │ └── supplier │ └── syslog │ ├── AbstractSyslogSupplierTests.java │ ├── NotNioTests.java │ ├── PropertiesPopulatedTests.java │ ├── Tcp3164Tests.java │ ├── Tcp5424Tests.java │ ├── TcpAndUdp3164Tests.java │ ├── TcpAndUdp5424Tests.java │ ├── Udp3164Tests.java │ └── Udp5424Tests.java ├── spring-tcp-supplier ├── README.adoc ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── tcp │ │ │ ├── TcpSupplierConfiguration.java │ │ │ ├── TcpSupplierProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ └── java │ └── org │ └── springframework │ └── cloud │ └── fn │ └── supplier │ └── tcp │ ├── AbstractTcpSupplierTests.java │ ├── CRLFTests.java │ ├── L1Tests.java │ ├── L2Tests.java │ ├── L4Tests.java │ ├── LFTests.java │ ├── NULLTests.java │ ├── NotNioTests.java │ ├── PropertiesPopulatedTests.java │ ├── RAWTests.java │ └── STXETXTests.java ├── spring-time-supplier ├── README.adoc └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── time │ │ │ ├── DateFormat.java │ │ │ ├── TimeSupplierConfiguration.java │ │ │ ├── TimeSupplierProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ └── java │ └── org │ └── springframework │ └── cloud │ └── fn │ └── supplier │ └── time │ ├── SimpleTimeSupplierTests.java │ ├── TimeSupplierApplicationTests.java │ └── VariationToSimpleTests.java ├── spring-twitter-supplier ├── README.adoc ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── twitter │ │ │ ├── friendships │ │ │ ├── TwitterFriendshipsSupplierConfiguration.java │ │ │ ├── TwitterFriendshipsSupplierProperties.java │ │ │ └── package-info.java │ │ │ ├── message │ │ │ ├── TwitterMessageSupplierConfiguration.java │ │ │ ├── TwitterMessageSupplierProperties.java │ │ │ └── package-info.java │ │ │ └── status │ │ │ ├── search │ │ │ ├── SearchPagination.java │ │ │ ├── TwitterSearchSupplierConfiguration.java │ │ │ ├── TwitterSearchSupplierProperties.java │ │ │ └── package-info.java │ │ │ └── stream │ │ │ ├── TwitterStreamSupplierConfiguration.java │ │ │ ├── TwitterStreamSupplierProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ ├── java │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── supplier │ │ └── twitter │ │ └── status │ │ ├── search │ │ └── SearchPaginationTests.java │ │ └── stream │ │ └── TwitterStreamSupplierTests.java │ └── resources │ ├── logback.xml │ └── response │ └── stream_test_1.json ├── spring-websocket-supplier ├── README.adoc ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── websocket │ │ │ ├── WebsocketSupplierConfiguration.java │ │ │ ├── WebsocketSupplierProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ └── java │ └── org │ └── springframework │ └── cloud │ └── fn │ └── supplier │ └── websocket │ └── WebsocketSupplierTests.java ├── spring-xmpp-supplier ├── README.adoc ├── build.gradle └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── cloud │ │ │ └── fn │ │ │ └── supplier │ │ │ └── xmpp │ │ │ ├── XmppSupplierConfiguration.java │ │ │ ├── XmppSupplierProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ └── java │ └── org │ └── springframework │ └── cloud │ └── fn │ └── supplier │ └── xmpp │ └── XmppSupplierConfigurationTests.java └── spring-zeromq-supplier ├── README.adoc ├── build.gradle └── src ├── main ├── java │ └── org │ │ └── springframework │ │ └── cloud │ │ └── fn │ │ └── supplier │ │ └── zeromq │ │ ├── ZeroMqSupplierConfiguration.java │ │ ├── ZeroMqSupplierProperties.java │ │ └── package-info.java └── resources │ └── META-INF │ └── spring │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports └── test └── java └── org └── springframework └── cloud └── fn └── supplier └── zeromq └── ZeroMqSupplierConfigurationTests.java /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: 'type: bug, status: waiting-for-triage' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **In what version(s) of Spring Functions Catalog are you seeing this issue?** 11 | 12 | For example: 13 | 14 | 5.0.0 15 | 16 | Between 5.0.0 and 5.1.0 17 | 18 | **Describe the bug** 19 | 20 | A clear and concise description of what the bug is. 21 | 22 | **To Reproduce** 23 | 24 | Steps to reproduce the behavior. 25 | 26 | **Expected behavior** 27 | 28 | A clear and concise description of what you expected to happen. 29 | 30 | **Sample** 31 | 32 | A link to a GitHub repository with a [minimal, reproducible sample](https://stackoverflow.com/help/minimal-reproducible-example). 33 | 34 | Reports that include a sample will take priority over reports that do not. 35 | At times, we may require a sample, so it is good to try and include a sample up front. 36 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Community Support 4 | url: https://stackoverflow.com/questions/tagged/spring-functions-catalog 5 | about: Please ask and answer questions on StackOverflow with the tag spring-functions-catalog 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: 'status: waiting-for-triage, type: enhancement' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Expected Behavior** 11 | 12 | 13 | 14 | **Current Behavior** 15 | 16 | 17 | 18 | **Context** 19 | 20 | 26 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /.github/dco.yml: -------------------------------------------------------------------------------- 1 | require: 2 | members: false 3 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: gradle 4 | directories: 5 | - '**/*' 6 | schedule: 7 | interval: weekly 8 | day: sunday 9 | ignore: 10 | - dependency-name: '*' 11 | update-types: 12 | - version-update:semver-major 13 | - version-update:semver-minor 14 | open-pull-requests-limit: 10 15 | labels: 16 | - 'type: dependency-upgrade' 17 | groups: 18 | development-dependencies: 19 | update-types: 20 | - patch 21 | patterns: 22 | - com.gradle.enterprise 23 | - com.github.spotbugs 24 | - io.spring.* 25 | - org.ajoberstar.grgit 26 | - com.icegreen:greenmail 27 | - org.mock-server* 28 | - org.apache.curator* 29 | - com.squareup.okhttp3* 30 | 31 | - package-ecosystem: github-actions 32 | directory: / 33 | schedule: 34 | interval: weekly 35 | day: saturday 36 | labels: 37 | - 'type: task' 38 | groups: 39 | development-dependencies: 40 | patterns: 41 | - '*' -------------------------------------------------------------------------------- /.github/workflows/announce-milestone-planning.yml: -------------------------------------------------------------------------------- 1 | name: Announce Milestone Planning in Chat 2 | 3 | on: 4 | milestone: 5 | types: [ created, edited ] 6 | 7 | jobs: 8 | announce-milestone-planning: 9 | uses: spring-io/spring-github-workflows/.github/workflows/spring-announce-milestone-planning.yml@v5 10 | secrets: 11 | SPRING_RELEASE_CHAT_WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_GCHAT_WEBHOOK_URL }} 12 | -------------------------------------------------------------------------------- /.github/workflows/auto-cherry-pick.yml: -------------------------------------------------------------------------------- 1 | name: Auto Cherry-Pick 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - '*.x' 8 | 9 | jobs: 10 | cherry-pick-commit: 11 | uses: spring-io/spring-github-workflows/.github/workflows/spring-cherry-pick.yml@v5 12 | secrets: 13 | GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/backport-issue.yml: -------------------------------------------------------------------------------- 1 | name: Backport Issue 2 | 3 | on: 4 | push: 5 | branches: 6 | - '*.x' 7 | 8 | jobs: 9 | backport-issue: 10 | uses: spring-io/spring-github-workflows/.github/workflows/spring-backport-issue.yml@v5 11 | secrets: 12 | GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} -------------------------------------------------------------------------------- /.github/workflows/ci-snapshot.yml: -------------------------------------------------------------------------------- 1 | name: CI SNAPSHOT 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | push: 7 | branches: 8 | - main 9 | - '*.x' 10 | 11 | schedule: 12 | - cron: '0 5 * * *' 13 | 14 | concurrency: 15 | group: group-snapshot-for-${{ github.ref }} 16 | cancel-in-progress: true 17 | 18 | jobs: 19 | build-snapshot: 20 | uses: spring-io/spring-github-workflows/.github/workflows/spring-artifactory-gradle-snapshot.yml@v5 21 | with: 22 | gradleTasks: ${{ github.event_name == 'schedule' && '--rerun-tasks' || '' }} 23 | secrets: 24 | DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} 25 | ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} 26 | ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} 27 | -------------------------------------------------------------------------------- /.github/workflows/merge-dependabot-pr.yml: -------------------------------------------------------------------------------- 1 | name: Merge Dependabot PR 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | - '*.x' 8 | 9 | run-name: Merge Dependabot PR ${{ github.ref_name }} 10 | 11 | jobs: 12 | merge-dependabot-pr: 13 | permissions: write-all 14 | uses: spring-io/spring-github-workflows/.github/workflows/spring-merge-dependabot-pr.yml@main 15 | with: 16 | mergeArguments: --auto --squash 17 | autoMergeSnapshots: true 18 | 19 | -------------------------------------------------------------------------------- /.github/workflows/pr-build.yml: -------------------------------------------------------------------------------- 1 | name: Pull Request Build 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | - '*.x' 8 | 9 | jobs: 10 | build-pull-request: 11 | uses: spring-io/spring-github-workflows/.github/workflows/spring-gradle-pull-request-build.yml@v5 12 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | run-name: Release current version for branch ${{ github.ref_name }} 7 | 8 | jobs: 9 | release: 10 | permissions: 11 | actions: write 12 | contents: write 13 | issues: write 14 | 15 | uses: spring-io/spring-github-workflows/.github/workflows/spring-artifactory-gradle-release.yml@main 16 | secrets: 17 | GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} 18 | DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} 19 | JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} 20 | ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} 21 | ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} 22 | OSSRH_S01_TOKEN_USERNAME: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }} 23 | OSSRH_S01_TOKEN_PASSWORD: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }} 24 | OSSRH_STAGING_PROFILE_NAME: ${{ secrets.OSSRH_STAGING_PROFILE_NAME }} 25 | GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} 26 | GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} 27 | SPRING_RELEASE_CHAT_WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_GCHAT_WEBHOOK_URL }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .settings/ 2 | .project 3 | .classpath 4 | build/ 5 | bin/ 6 | .gradle/ 7 | .idea/ 8 | out/ 9 | .vscode/ 10 | -------------------------------------------------------------------------------- /common/spring-aws-s3-common/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api springIntegrationAws 3 | api 'io.awspring.cloud:spring-cloud-aws-starter-s3' 4 | api 'software.amazon.awssdk:aws-crt-client' 5 | api 'software.amazon.awssdk:sts' 6 | api 'org.springframework.integration:spring-integration-file' 7 | } 8 | -------------------------------------------------------------------------------- /common/spring-aws-s3-common/src/main/java/org/springframework/cloud/fn/common/aws/s3/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The common classes for AWS S3 functions. 3 | */ 4 | package org.springframework.cloud.fn.common.aws.s3; 5 | -------------------------------------------------------------------------------- /common/spring-aws-s3-common/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.common.aws.s3.AmazonS3Configuration 2 | -------------------------------------------------------------------------------- /common/spring-config-common/src/main/java/org/springframework/cloud/fn/common/config/ComponentCustomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.common.config; 18 | 19 | /** 20 | * The customizer contract to apply to beans in the application context which type is 21 | * matching to generic type of the instance of this interface. 22 | * 23 | * @param the target component (bean) type in the application context to customize. 24 | * @author Artem Bilan 25 | * @since 1.2.1 26 | */ 27 | @FunctionalInterface 28 | public interface ComponentCustomizer { 29 | 30 | void customize(T component); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /common/spring-config-common/src/main/java/org/springframework/cloud/fn/common/config/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The common classes for all functions. 3 | */ 4 | package org.springframework.cloud.fn.common.config; 5 | -------------------------------------------------------------------------------- /common/spring-config-common/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.common.config.SpelExpressionConverterConfiguration 2 | -------------------------------------------------------------------------------- /common/spring-debezium-autoconfigure/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-debezium' 3 | 4 | testImplementation 'io.debezium:debezium-connector-mysql' 5 | testImplementation 'org.springframework:spring-jdbc' 6 | testImplementation 'com.zaxxer:HikariCP' 7 | } 8 | -------------------------------------------------------------------------------- /common/spring-debezium-autoconfigure/src/main/java/org/springframework/cloud/fn/common/debezium/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The common auto-configuration support for Debezium. 3 | */ 4 | package org.springframework.cloud.fn.common.debezium; 5 | -------------------------------------------------------------------------------- /common/spring-debezium-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.common.debezium.DebeziumEngineBuilderAutoConfiguration 2 | -------------------------------------------------------------------------------- /common/spring-file-common/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-file' 3 | } 4 | -------------------------------------------------------------------------------- /common/spring-file-common/src/main/java/org/springframework/cloud/fn/common/file/FileReadingMode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.common.file; 18 | 19 | /** 20 | * Defines the supported modes of reading and processing files. 21 | * 22 | * @author Gunnar Hillert 23 | * @author David Turanski 24 | */ 25 | public enum FileReadingMode { 26 | 27 | /** 28 | * ref mode. 29 | */ 30 | ref, 31 | /** 32 | * lines mode. 33 | */ 34 | lines, 35 | /** 36 | * contents mode. 37 | */ 38 | contents 39 | 40 | } 41 | -------------------------------------------------------------------------------- /common/spring-file-common/src/main/java/org/springframework/cloud/fn/common/file/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The file-based functions supporting classes. 3 | */ 4 | package org.springframework.cloud.fn.common.file; 5 | -------------------------------------------------------------------------------- /common/spring-file-common/src/main/java/org/springframework/cloud/fn/common/file/remote/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The remote file protocols supporting classes. 3 | */ 4 | package org.springframework.cloud.fn.common.file.remote; 5 | -------------------------------------------------------------------------------- /common/spring-ftp-common/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-ftp' 3 | } 4 | -------------------------------------------------------------------------------- /common/spring-ftp-common/src/main/java/org/springframework/cloud/fn/common/ftp/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The FTP session factory auto-configuration. 3 | */ 4 | package org.springframework.cloud.fn.common.ftp; 5 | -------------------------------------------------------------------------------- /common/spring-ftp-common/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.common.ftp.FtpSessionFactoryConfiguration 2 | -------------------------------------------------------------------------------- /common/spring-function-test-support/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.junit.jupiter:junit-jupiter-api' 3 | api 'org.testcontainers:junit-jupiter' 4 | 5 | optionalApi ftpServerCore 6 | optionalApi 'org.springframework.integration:spring-integration-sftp' 7 | optionalApi 'org.springframework:spring-websocket' 8 | } 9 | -------------------------------------------------------------------------------- /common/spring-function-test-support/src/main/java/org/springframework/cloud/fn/test/support/file/remote/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The remote file protocols testing support. 3 | */ 4 | package org.springframework.cloud.fn.test.support.file.remote; 5 | -------------------------------------------------------------------------------- /common/spring-function-test-support/src/main/java/org/springframework/cloud/fn/test/support/ftp/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The FTP protocol testing support. 3 | */ 4 | package org.springframework.cloud.fn.test.support.ftp; 5 | -------------------------------------------------------------------------------- /common/spring-function-test-support/src/main/java/org/springframework/cloud/fn/test/support/mqtt/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The MQTT protocol testing support. 3 | */ 4 | package org.springframework.cloud.fn.test.support.mqtt; 5 | -------------------------------------------------------------------------------- /common/spring-function-test-support/src/main/java/org/springframework/cloud/fn/test/support/sftp/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The SFTP protocol testing support. 3 | */ 4 | package org.springframework.cloud.fn.test.support.sftp; 5 | -------------------------------------------------------------------------------- /common/spring-function-test-support/src/main/java/org/springframework/cloud/fn/test/support/websocket/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The WebSocket protocol testing support. 3 | */ 4 | package org.springframework.cloud.fn.test.support.websocket; 5 | -------------------------------------------------------------------------------- /common/spring-function-test-support/src/main/java/org/springframework/cloud/fn/test/support/xmpp/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The XMPP protocol testing support. 3 | */ 4 | package org.springframework.cloud.fn.test.support.xmpp; 5 | -------------------------------------------------------------------------------- /common/spring-function-test-support/src/main/resources/id_rsa_pp.pub: -------------------------------------------------------------------------------- 1 | AAAAB3NzaC1yc2EAAAADAQABAAABAQC6MIzgyVi8G1+HRhFHPWRH+3w/8/uxtiuIfb4puVPjHI53Lvf5odzfhv0T6Z2/jSXmI3I6dpjbsgiptdCTX4kqUFLXxkuJR4LHatNtgO1w32aVIdAvfj7KtrL3SmP2XWqQGVcUWHEn2H1RHFHKdC6ArYFb1X8p5N/BHSQjuttaeVi9FsDxvC5euIbtDEEJmmvjjfWlI1m/6qCqMYxDWA9i9APU/rB0QwFNUQ6HuZ2QzEaU/hQMGmqgW5o1I/W8JR0bqis8wZQDLv1fwCkXpWG5BAuiJH+FJMxRAkfEMBpVwO7Sl0ufePVuSM2BMAAe+4a75sVp8ahbOId6y0GUTeJl 2 | -------------------------------------------------------------------------------- /common/spring-function-test-support/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /common/spring-function-test-support/src/main/resources/xmpp/conf/openfire.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9090 6 | 9091 7 | 8 | 9 | org.jivesoftware.database.DefaultConnectionProvider 10 | 11 | true 12 | en 13 | localhost 14 | 15 | -------------------------------------------------------------------------------- /common/spring-function-test-support/src/main/resources/xmpp/conf/security/archive/readme.txt: -------------------------------------------------------------------------------- 1 | This directory is used as a default location in which Openfire stores backups of keystore files. 2 | -------------------------------------------------------------------------------- /common/spring-function-test-support/src/main/resources/xmpp/conf/security/client.truststore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-cloud/spring-functions-catalog/9a42b71aef92b6135a527385e4361d31e7318c23/common/spring-function-test-support/src/main/resources/xmpp/conf/security/client.truststore -------------------------------------------------------------------------------- /common/spring-function-test-support/src/main/resources/xmpp/conf/security/keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-cloud/spring-functions-catalog/9a42b71aef92b6135a527385e4361d31e7318c23/common/spring-function-test-support/src/main/resources/xmpp/conf/security/keystore -------------------------------------------------------------------------------- /common/spring-function-test-support/src/main/resources/xmpp/conf/security/truststore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-cloud/spring-functions-catalog/9a42b71aef92b6135a527385e4361d31e7318c23/common/spring-function-test-support/src/main/resources/xmpp/conf/security/truststore -------------------------------------------------------------------------------- /common/spring-function-test-support/src/main/resources/xmpp/conf/server-update.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /common/spring-metadata-store-common/build.gradle: -------------------------------------------------------------------------------- 1 | ext{ 2 | // Starting with Hazelcast 5.5 CP subsystem is a commercial feature 3 | set('hazelcast.version', '5.4.0') 4 | } 5 | 6 | dependencies { 7 | optionalApi 'org.springframework.integration:spring-integration-redis' 8 | optionalApi 'org.springframework.boot:spring-boot-starter-data-redis' 9 | optionalApi 'org.springframework.integration:spring-integration-mongodb' 10 | optionalApi 'org.springframework.boot:spring-boot-starter-data-mongodb' 11 | optionalApi 'org.springframework.integration:spring-integration-jdbc' 12 | optionalApi 'org.springframework.boot:spring-boot-starter-data-jdbc' 13 | optionalApi 'io.awspring.cloud:spring-cloud-aws-starter' 14 | optionalApi 'org.springframework.integration:spring-integration-zookeeper' 15 | optionalApi 'org.springframework.integration:spring-integration-hazelcast' 16 | optionalApi springIntegrationAws 17 | optionalApi 'software.amazon.awssdk:dynamodb' 18 | 19 | testImplementation 'org.hsqldb:hsqldb' 20 | testImplementation 'org.apache.curator:curator-test:5.7.1' 21 | } 22 | -------------------------------------------------------------------------------- /common/spring-metadata-store-common/src/main/java/org/springframework/cloud/fn/common/metadata/store/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The metadata store auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.common.metadata.store; 5 | -------------------------------------------------------------------------------- /common/spring-metadata-store-common/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.common.metadata.store.MetadataStoreAutoConfiguration 2 | -------------------------------------------------------------------------------- /common/spring-mqtt-common/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-mqtt' 3 | } 4 | -------------------------------------------------------------------------------- /common/spring-mqtt-common/src/main/java/org/springframework/cloud/fn/common/mqtt/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The MQTT client auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.common.mqtt; 5 | -------------------------------------------------------------------------------- /common/spring-mqtt-common/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.common.mqtt.MqttConfiguration 2 | -------------------------------------------------------------------------------- /common/spring-tcp-common/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-ip' 3 | } 4 | -------------------------------------------------------------------------------- /common/spring-tcp-common/src/main/java/org/springframework/cloud/fn/common/tcp/Encoding.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.common.tcp; 18 | 19 | /** 20 | * The encoding modes. 21 | * 22 | * @author Gary Russell 23 | * @author Christian Tzolov 24 | */ 25 | public enum Encoding { 26 | 27 | /** 28 | * CRLF encoding. 29 | */ 30 | CRLF, 31 | /** 32 | * LF encoding. 33 | */ 34 | LF, 35 | /** 36 | * Null encoding. 37 | */ 38 | NULL, 39 | /** 40 | * STXETX encoding. 41 | */ 42 | STXETX, 43 | /** 44 | * Raw encoding. 45 | */ 46 | RAW, 47 | /** 48 | * L1 encoding. 49 | */ 50 | L1, 51 | /** 52 | * L2 encoding. 53 | */ 54 | L2, 55 | /** 56 | * L4 encoding. 57 | */ 58 | L4 59 | 60 | } 61 | -------------------------------------------------------------------------------- /common/spring-tcp-common/src/main/java/org/springframework/cloud/fn/common/tcp/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The TCP protocol supporting classes. 3 | */ 4 | package org.springframework.cloud.fn.common.tcp; 5 | -------------------------------------------------------------------------------- /common/spring-twitter-common/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.twitter4j:twitter4j-stream:4.0.7' 3 | api 'org.springframework.integration:spring-integration-ip' 4 | } 5 | -------------------------------------------------------------------------------- /common/spring-twitter-common/src/main/java/org/springframework/cloud/fn/common/twitter/Cursor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.common.twitter; 18 | 19 | /** 20 | * The cursor abstraction. 21 | * 22 | * @author Christian Tzolov 23 | */ 24 | public class Cursor { 25 | 26 | private long cursor = -1; 27 | 28 | public long getCursor() { 29 | return this.cursor; 30 | } 31 | 32 | public void updateCursor(long newCursor) { 33 | this.cursor = (newCursor > 0) ? newCursor : -1; 34 | } 35 | 36 | @Override 37 | public String toString() { 38 | return "Cursor{cursor=" + this.cursor + '}'; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /common/spring-twitter-common/src/main/java/org/springframework/cloud/fn/common/twitter/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Twitter4J connection support classes. 3 | */ 4 | package org.springframework.cloud.fn.common.twitter; 5 | -------------------------------------------------------------------------------- /common/spring-twitter-common/src/main/java/org/springframework/cloud/fn/common/twitter/util/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Twitter applications utility classes. 3 | */ 4 | package org.springframework.cloud.fn.common.twitter.util; 5 | -------------------------------------------------------------------------------- /common/spring-twitter-common/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.common.twitter.TwitterConnectionConfiguration 2 | -------------------------------------------------------------------------------- /common/spring-xmpp-common/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-xmpp' 3 | } 4 | -------------------------------------------------------------------------------- /common/spring-xmpp-common/src/main/java/org/springframework/cloud/fn/common/xmpp/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The XMPP connection factory auto-configuration. 3 | */ 4 | package org.springframework.cloud.fn.common.xmpp; 5 | -------------------------------------------------------------------------------- /common/spring-xmpp-common/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.common.xmpp.XmppConnectionFactoryConfiguration 2 | -------------------------------------------------------------------------------- /consumer/spring-analytics-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-payload-converter-function') 3 | api 'io.micrometer:micrometer-core' 4 | api 'org.springframework.boot:spring-boot-starter-actuator' 5 | 6 | testImplementation 'io.micrometer:micrometer-registry-wavefront' 7 | } 8 | -------------------------------------------------------------------------------- /consumer/spring-analytics-consumer/src/main/java/org/springframework/cloud/fn/consumer/analytics/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The analytics consumer classes. 3 | */ 4 | package org.springframework.cloud.fn.consumer.analytics; 5 | -------------------------------------------------------------------------------- /consumer/spring-analytics-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.analytics.AnalyticsConsumerConfiguration 2 | -------------------------------------------------------------------------------- /consumer/spring-analytics-consumer/src/test/java/org/springframework/cloud/fn/consumer/analytics/CountWithAmountTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.consumer.analytics; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.messaging.support.GenericMessage; 22 | import org.springframework.test.context.TestPropertySource; 23 | 24 | import static org.assertj.core.api.Assertions.assertThat; 25 | 26 | /** 27 | * @author Christian Tzolov 28 | */ 29 | @TestPropertySource(properties = { "analytics.name=counter666", "analytics.tag.expression.foo='bar'", 30 | "analytics.amount-expression=payload.length()" }) 31 | class CountWithAmountTests extends AnalyticsConsumerParentTests { 32 | 33 | @Test 34 | void testCounterSink() { 35 | String message = "hello world message"; 36 | double messageSize = Long.valueOf(message.length()).doubleValue(); 37 | analyticsConsumer.accept(new GenericMessage<>(message)); 38 | assertThat(meterRegistry.find("counter666").counter().count()).isEqualTo(messageSize); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /consumer/spring-analytics-consumer/src/test/java/org/springframework/cloud/fn/consumer/analytics/ExpressionCounterNameTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.consumer.analytics; 18 | 19 | import java.util.stream.IntStream; 20 | 21 | import org.junit.jupiter.api.Test; 22 | 23 | import org.springframework.messaging.support.GenericMessage; 24 | import org.springframework.test.context.TestPropertySource; 25 | 26 | import static org.assertj.core.api.Assertions.assertThat; 27 | 28 | /** 29 | * @author Christian Tzolov 30 | */ 31 | @TestPropertySource(properties = { "analytics.name-expression=payload" }) 32 | public class ExpressionCounterNameTests extends AnalyticsConsumerParentTests { 33 | 34 | @Test 35 | void testCounterSink() { 36 | IntStream.range(0, 13).forEach((i) -> analyticsConsumer.accept(new GenericMessage<>("hello"))); 37 | assertThat(meterRegistry.find("hello").counter().count()).isEqualTo(13.0); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /consumer/spring-analytics-consumer/src/test/resources/data/stock_appl.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "date": "2020-05-21T00:00:00+0000", 4 | "symbol": "AAPL", 5 | "exchange": "XNAS", 6 | "open": 318.66, 7 | "high": 320.89, 8 | "low": 315.87, 9 | "close": 316.85, 10 | "volume": 25672211.0 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /consumer/spring-analytics-consumer/src/test/resources/data/stock_vmw.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "date": "2020-05-21T00:00:00+0000", 4 | "symbol": "VMW", 5 | "exchange": "NYSE", 6 | "open": 160.16, 7 | "high": 180.91, 8 | "low": 165.87, 9 | "close": 170.85, 10 | "volume": 5672211.0 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /consumer/spring-cassandra-consumer/README.adoc: -------------------------------------------------------------------------------- 1 | = Cassandra Consumer 2 | 3 | This module provides a Cassandra Consumer that can be reused and composed in other applications. 4 | Internally it uses the `CassandraMessageHandler` from Spring Integration. 5 | `CassandraConsumerFunction` is implemented as a `java.util.function.Function`. 6 | 7 | == Beans for injection 8 | 9 | The `CassnadraConsumerConfiguration` auto-configuration provides the following beans: 10 | 11 | `cassandraConsumerFunction` 12 | 13 | You can use `cassandraConsumerFunction` as a qualifier when injecting. 14 | 15 | Type for injection: `Function>` 16 | 17 | You have to subscribe to the returned `Mono` to trigger a communication with Cassandra. 18 | Or use `Consumer cassandraConsumer` instead which ignores the result and performs just `Mono.block()` before returning. 19 | 20 | == Configuration Options 21 | 22 | All configuration properties are prefixed with `cassandra.consumer` and `cassandra.cluster`. 23 | 24 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/cassandra/CassandraConsumerProperties.java[CassandraConsumerProperties]. 25 | See link:src/main/java/org/springframework/cloud/fn/consumer/cassandra/cluster/CassandraClusterProperties.java[this] also. 26 | 27 | == Tests 28 | 29 | See this link:src/test/java/org/springframework/cloud/fn/consumer/cassandra[test suite] for the various ways, this consumer is used. 30 | 31 | == Other usage 32 | 33 | See this https://github.com/spring-cloud/stream-applications/blob/main/applications/sink/cassandra-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream application where it makes a Cassandra sink. 34 | -------------------------------------------------------------------------------- /consumer/spring-cassandra-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-cassandra' 3 | api 'org.springframework.boot:spring-boot-starter-data-cassandra-reactive' 4 | 5 | testImplementation ('org.testcontainers:cassandra') { 6 | exclude group: 'com.datastax.cassandra' 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /consumer/spring-cassandra-consumer/src/main/java/org/springframework/cloud/fn/consumer/cassandra/cluster/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Apache Cassandra cluster support. 3 | */ 4 | package org.springframework.cloud.fn.consumer.cassandra.cluster; 5 | -------------------------------------------------------------------------------- /consumer/spring-cassandra-consumer/src/main/java/org/springframework/cloud/fn/consumer/cassandra/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Apache Cassandra consumer auto-configuration. 3 | */ 4 | package org.springframework.cloud.fn.consumer.cassandra; 5 | -------------------------------------------------------------------------------- /consumer/spring-cassandra-consumer/src/main/java/org/springframework/cloud/fn/consumer/cassandra/query/ColumnNameExtractor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.consumer.cassandra.query; 18 | 19 | import java.util.List; 20 | 21 | /** 22 | * The contact to extract column names from the Apache Cassandra query. 23 | * 24 | * @author Akos Ratku 25 | * @author Artem Bilan 26 | */ 27 | @FunctionalInterface 28 | public interface ColumnNameExtractor { 29 | 30 | List extract(String query); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /consumer/spring-cassandra-consumer/src/main/java/org/springframework/cloud/fn/consumer/cassandra/query/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Apache Cassandra query utilities. 3 | */ 4 | package org.springframework.cloud.fn.consumer.cassandra.query; 5 | -------------------------------------------------------------------------------- /consumer/spring-cassandra-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.cassandra.CassandraConsumerConfiguration 2 | org.springframework.cloud.fn.consumer.cassandra.cluster.CassandraAppClusterConfiguration 3 | -------------------------------------------------------------------------------- /consumer/spring-cassandra-consumer/src/test/java/org/springframework/cloud/fn/consumer/cassandra/domain/Book.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.consumer.cassandra.domain; 18 | 19 | import java.time.LocalDate; 20 | import java.util.UUID; 21 | 22 | import org.springframework.data.cassandra.core.mapping.Indexed; 23 | import org.springframework.data.cassandra.core.mapping.PrimaryKey; 24 | import org.springframework.data.cassandra.core.mapping.Table; 25 | 26 | /** 27 | * Test POJO. 28 | * 29 | * @author David Webb 30 | * @author Artem Bilan 31 | */ 32 | @Table("book") 33 | public record Book(@PrimaryKey UUID isbn, String title, @Indexed String author, Integer pages, LocalDate saleDate, 34 | Boolean isInStock) { 35 | 36 | } 37 | -------------------------------------------------------------------------------- /consumer/spring-cassandra-consumer/src/test/resources/init-db.cql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS book; 2 | 3 | CREATE TABLE book ( 4 | isbn uuid PRIMARY KEY, 5 | author text, 6 | instock boolean, 7 | pages int, 8 | saledate date, 9 | title text 10 | ); 11 | -------------------------------------------------------------------------------- /consumer/spring-elasticsearch-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-payload-converter-function') 3 | api 'org.springframework.boot:spring-boot-starter-data-elasticsearch' 4 | 5 | testImplementation 'org.testcontainers:elasticsearch' 6 | } 7 | -------------------------------------------------------------------------------- /consumer/spring-elasticsearch-consumer/src/main/java/org/springframework/cloud/fn/consumer/elasticsearch/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Elasticsearch consumer auto-configuration. 3 | */ 4 | package org.springframework.cloud.fn.consumer.elasticsearch; 5 | -------------------------------------------------------------------------------- /consumer/spring-elasticsearch-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.elasticsearch.ElasticsearchConsumerConfiguration 2 | -------------------------------------------------------------------------------- /consumer/spring-elasticsearch-consumer/src/test/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /consumer/spring-file-consumer/README.adoc: -------------------------------------------------------------------------------- 1 | = File Consumer 2 | 3 | A consumer that allows you to write incoming messages into files. 4 | The consumer uses the `FileWritingMessageHandler` from Spring Integration. 5 | 6 | == Beans for injection 7 | 8 | The `FileConsumerConfiguration` auto-configuration provides the following bean: 9 | 10 | `Consumer> fileConsumer` 11 | 12 | You can use `fileConsumer` as a qualifier when injecting. 13 | 14 | == Configuration Options 15 | 16 | All configuration properties are prefixed with `file.consumer`. 17 | 18 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/file/FileConsumerProperties.java[FileConsumerProperties]. 19 | 20 | A `ComponentCustomizer` bean can be added in the target project to provide any custom options for the `FileWritingMessageHandler` configuration used by the `fileConsumer`. 21 | 22 | == Tests 23 | 24 | See this link:src/test/java/org/springframework/cloud/fn/consumer/file[test suite] for the various ways, this consumer is used. 25 | 26 | == Other usage 27 | 28 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/file-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream application where it makes a File sink. 29 | -------------------------------------------------------------------------------- /consumer/spring-file-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-file' 3 | } 4 | -------------------------------------------------------------------------------- /consumer/spring-file-consumer/src/main/java/org/springframework/cloud/fn/consumer/file/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The file consumer auto-configuration. 3 | */ 4 | package org.springframework.cloud.fn.consumer.file; 5 | -------------------------------------------------------------------------------- /consumer/spring-file-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.file.FileConsumerConfiguration 2 | -------------------------------------------------------------------------------- /consumer/spring-ftp-consumer/README.adoc: -------------------------------------------------------------------------------- 1 | = Ftp Consumer 2 | 3 | A consumer that allows you to ftp files. 4 | The consumer uses the `FtpMessageHandler` from Spring Integration. 5 | 6 | == Beans for injection 7 | 8 | The `FtpConsumerConfiguration` auto-configuration provides the following bean: 9 | 10 | `Consumer> ftpConsumer` 11 | 12 | You can use `ftpConsumer` as a qualifier when injecting. 13 | 14 | == Configuration Options 15 | 16 | All configuration properties are prefixed with `ftp.consumer`. 17 | 18 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/ftp/FtpConsumerProperties.java[FtpConsumerProperties]. 19 | 20 | A `ComponentCustomizer` bean can be added in the target project to provide any custom options for the `FtpMessageHandlerSpec` configuration used by the `ftpConsumer`. 21 | 22 | == Tests 23 | 24 | See this link:src/test/java/org/springframework/cloud/fn/consumer/ftp[test suite] for the various ways, this consumer is used. 25 | 26 | == Other usage 27 | 28 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/ftp-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream application where it makes a Ftp sink. 29 | -------------------------------------------------------------------------------- /consumer/spring-ftp-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-ftp-common') 3 | 4 | testImplementation project(':spring-function-test-support') 5 | testImplementation ftpServerCore 6 | } 7 | -------------------------------------------------------------------------------- /consumer/spring-ftp-consumer/src/main/java/org/springframework/cloud/fn/consumer/ftp/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The FTP consumer auto-configuration. 3 | */ 4 | package org.springframework.cloud.fn.consumer.ftp; 5 | -------------------------------------------------------------------------------- /consumer/spring-ftp-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.ftp.FtpConsumerConfiguration 2 | -------------------------------------------------------------------------------- /consumer/spring-jdbc-consumer/README.adoc: -------------------------------------------------------------------------------- 1 | = Jdbc Consumer 2 | 3 | A consumer that allows you to insert records into a relational database. 4 | The consumer uses the `JdbcMessageHandler` from Spring Integration. 5 | 6 | == Beans for injection 7 | 8 | The `JdbcConsumerConfiguration` auto-configuration provides the following bean: 9 | 10 | `Consumer> jdbcConsumer` 11 | 12 | You can use `jdbcConsumer` as a qualifier when injecting. 13 | 14 | == Configuration Options 15 | 16 | All configuration properties are prefixed with `jdbc.consumer`. 17 | 18 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/jdbc/JdbcConsumerProperties.java[JdbcConsumerProperties]. 19 | 20 | == Tests 21 | 22 | See this link:src/test/java/org/springframework/cloud/fn/consumer/jdbc[test suite] for the various ways, this consumer is used. 23 | 24 | == Other usage 25 | 26 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/jdbc-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream application where it makes a Jdbc sink. -------------------------------------------------------------------------------- /consumer/spring-jdbc-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-jdbc' 3 | api 'org.springframework.boot:spring-boot-starter-jdbc' 4 | 5 | runtimeOnly 'org.hsqldb:hsqldb' 6 | runtimeOnly 'com.h2database:h2' 7 | runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' 8 | runtimeOnly 'org.postgresql:postgresql' 9 | runtimeOnly 'com.microsoft.sqlserver:mssql-jdbc' 10 | } 11 | -------------------------------------------------------------------------------- /consumer/spring-jdbc-consumer/src/main/java/org/springframework/cloud/fn/consumer/jdbc/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The JDBC consumer auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.consumer.jdbc; 5 | -------------------------------------------------------------------------------- /consumer/spring-jdbc-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.jdbc.JdbcConsumerConfiguration 2 | -------------------------------------------------------------------------------- /consumer/spring-jdbc-consumer/src/test/resources/explicit-script.sql: -------------------------------------------------------------------------------- 1 | -- Used in test for explicit script 2 | 3 | create table foobar( 4 | a varchar(2000), 5 | b VARCHAR (2000) 6 | ); 7 | -------------------------------------------------------------------------------- /consumer/spring-jdbc-consumer/src/test/resources/schema.sql: -------------------------------------------------------------------------------- 1 | -- Run by default by Boot infrastructure 2 | 3 | create table messages( 4 | a varchar(2000), 5 | b VARCHAR (2000), 6 | payload VARCHAR (2000) 7 | ); 8 | -------------------------------------------------------------------------------- /consumer/spring-kafka-publisher/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-kafka' 3 | 4 | testImplementation 'org.springframework.kafka:spring-kafka-test' 5 | } 6 | -------------------------------------------------------------------------------- /consumer/spring-kafka-publisher/src/main/java/org/springframework/cloud/fn/consumer/kafka/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Kafka consumer (publisher) auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.consumer.kafka; 5 | -------------------------------------------------------------------------------- /consumer/spring-kafka-publisher/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.kafka.KafkaPublisherConfiguration 2 | -------------------------------------------------------------------------------- /consumer/spring-log-consumer/README.adoc: -------------------------------------------------------------------------------- 1 | = Log Consumer 2 | 3 | A consumer that allows you to log the data 4 | The consumer uses the `LoggingMessageHandler` from Spring Integration. 5 | 6 | == Beans for injection 7 | 8 | The `LogConsumerConfiguration` auto-configuration provides the following bean: 9 | 10 | `Consumer> logConsumer` 11 | 12 | You can use `logConsumer` as a qualifier when injecting. 13 | 14 | == Configuration Options 15 | 16 | All configuration properties are prefixed with `log.consumer`. 17 | 18 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/log/LogConsumerProperties.java[LogConsumerProperties]. 19 | 20 | == Tests 21 | 22 | See this link:src/test/java/org/springframework/cloud/fn/consumer/log/LogConsumerApplicationTests.java[test suite] for the various ways, this consumer is used. 23 | 24 | == Other usage 25 | 26 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/log-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream application where it makes a Log sink. -------------------------------------------------------------------------------- /consumer/spring-log-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-payload-converter-function') 3 | 4 | optionalApi 'org.hibernate.validator:hibernate-validator' 5 | } 6 | -------------------------------------------------------------------------------- /consumer/spring-log-consumer/src/main/java/org/springframework/cloud/fn/consumer/log/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Log consumer auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.consumer.log; 5 | -------------------------------------------------------------------------------- /consumer/spring-log-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.log.LogConsumerConfiguration 2 | -------------------------------------------------------------------------------- /consumer/spring-mongodb-consumer/README.adoc: -------------------------------------------------------------------------------- 1 | = MongoDB Consumer 2 | 3 | A consumer that allows you to insert records into MongoDB. 4 | 5 | == Beans for injection 6 | 7 | The `MongoDbConsumerConfiguration` auto-configuration provides the following beans: 8 | 9 | `Function, Mono> mongodbConsumerFunction` - Allows you to subscribe. 10 | 11 | `Consumer> mongodbConsumer` - Wraps the function as a Consumer with no-op subscriber. 12 | 13 | You can use `mongodbConsumer` or `mongodbConsumerFunction` as a qualifier when injecting. 14 | 15 | The return value from the function can be ignored as this is used as a consumer to send records to MongoDB. 16 | 17 | == Configuration Options 18 | 19 | All configuration properties are prefixed with `mongodb.consumer`. 20 | 21 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/mongo/MongoDbConsumerProperties.java[MongoDBConsumerProperties]. 22 | 23 | A `ComponentCustomizer` bean can be added in the target project to provide any custom options for the `ReactiveMongoDbStoringMessageHandler` configuration used by the `mongodbConsumer`. 24 | 25 | == Examples 26 | 27 | See this link:src/test/java/org/springframework/cloud/fn/consumer/mongo/MongoDbConsumerApplicationTests.java[test suite] for the various ways, this consumer is used. 28 | 29 | == Other usage 30 | 31 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/mongodb-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream application where it makes a MongoDB sink. 32 | -------------------------------------------------------------------------------- /consumer/spring-mongodb-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-mongodb' 3 | api 'org.mongodb:mongodb-driver-reactivestreams' 4 | 5 | testImplementation 'org.testcontainers:mongodb' 6 | } 7 | -------------------------------------------------------------------------------- /consumer/spring-mongodb-consumer/src/main/java/org/springframework/cloud/fn/consumer/mongo/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The MongoDB consumer auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.consumer.mongo; 5 | -------------------------------------------------------------------------------- /consumer/spring-mongodb-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.mongo.MongoDbConsumerConfiguration 2 | -------------------------------------------------------------------------------- /consumer/spring-mongodb-consumer/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /consumer/spring-mqtt-consumer/README.adoc: -------------------------------------------------------------------------------- 1 | = MQTT Consumer 2 | 3 | A consumer that allows you to send messages using the MQTT protocol. 4 | 5 | == Beans for injection 6 | 7 | The `MqttConsumerConfiguration` auto-configuration provides the following bean: 8 | 9 | `Consumer> mqttConsumer` 10 | 11 | You can use `mqttConsumer` as a qualifier when injecting. 12 | 13 | == Configuration Options 14 | 15 | All configuration properties are prefixed with `mqtt.consumer`. 16 | 17 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/mqtt/MqttConsumerProperties.java[MqttConsumerProperties]. 18 | 19 | A `ComponentCustomizer` bean can be added in the target project to provide any custom options for the `MqttPahoMessageHandler` configuration used by the `mqttConsumer`. 20 | 21 | == SSL Configuration 22 | 23 | The MQTT Paho client can accept an SSL configuration via `MqttConnectOptions.setSSLProperties()`. 24 | These properties are exposed on the `MqttProperties.sslProperties` map. 25 | The keys for these SSL properties should be taken from the `org.eclipse.paho.client.mqttv3.internal.security.SSLSocketFactoryFactory` constants, which all start with the `com.ibm.ssl.` prefix. 26 | 27 | == Tests 28 | 29 | See this link:src/test/java/org/springframework/cloud/fn/consumer/mqtt/MqttConsumerTests.java[test suite] for the various ways, this consumer is used. 30 | 31 | == Other usage 32 | 33 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/mqtt-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream application where it makes a MQTT sink. 34 | -------------------------------------------------------------------------------- /consumer/spring-mqtt-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-mqtt-common') 3 | 4 | testImplementation project(':spring-function-test-support') 5 | } 6 | -------------------------------------------------------------------------------- /consumer/spring-mqtt-consumer/src/main/java/org/springframework/cloud/fn/consumer/mqtt/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The MQTT consumer auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.consumer.mqtt; 5 | -------------------------------------------------------------------------------- /consumer/spring-mqtt-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.mqtt.MqttConsumerConfiguration 2 | -------------------------------------------------------------------------------- /consumer/spring-mqtt-consumer/src/test/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /consumer/spring-rabbit-consumer/README.adoc: -------------------------------------------------------------------------------- 1 | = RabbitMQ Consumer 2 | 3 | A consumer that allows you to send messages to RabbitMQ. 4 | 5 | == Beans for injection 6 | 7 | The `RabbitConsumerConfiguration` auto-configuration provides the following bean: 8 | 9 | `Function, Object> rabbitConsumer` 10 | 11 | You can use `rabbitConsumer` as a qualifier when injecting. 12 | 13 | == Configuration Options 14 | 15 | All configuration properties are prefixed with `rabbit.consumer`. 16 | 17 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/rabbit/RabbitConsumerProperties.java[RabbitConsumerProperties]. 18 | 19 | A `ComponentCustomizer` bean can be added in the target project to provide any custom options for the `AmqpOutboundChannelAdapterSpec` configuration used by the `rabbitConsumer`. 20 | 21 | == Other usage 22 | 23 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/rabbit-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream application where it makes a RabbitMQ sink. 24 | -------------------------------------------------------------------------------- /consumer/spring-rabbit-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-amqp' 3 | api 'org.springframework.boot:spring-boot-starter-amqp' 4 | 5 | testImplementation 'org.testcontainers:rabbitmq' 6 | } 7 | -------------------------------------------------------------------------------- /consumer/spring-rabbit-consumer/src/main/java/org/springframework/cloud/fn/consumer/rabbit/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The RabbitMQ consumer auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.consumer.rabbit; 5 | -------------------------------------------------------------------------------- /consumer/spring-rabbit-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.rabbit.RabbitConsumerConfiguration 2 | -------------------------------------------------------------------------------- /consumer/spring-redis-consumer/README.adoc: -------------------------------------------------------------------------------- 1 | = Redis Consumer 2 | 3 | A consumer that allows you to write incoming messages into Redis. 4 | 5 | == Beans for injection 6 | 7 | The `RedisConsumerConfiguration` auto-configuration provides the following bean: 8 | 9 | `Consumer> redisConsumer` 10 | 11 | You can use `redisConsumer` as a qualifier when injecting. 12 | 13 | == Configuration Options 14 | 15 | All configuration properties are prefixed with `redis.consumer`. 16 | 17 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/redis/RedisConsumerProperties.java[RedisConsumerProperties]. 18 | 19 | == Tests 20 | 21 | See this link:src/test/java/org/springframework/cloud/fn/consumer/redis[test suite] for the various ways, this consumer is used. 22 | 23 | == Other usage 24 | 25 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/redis-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream application where it makes a Redis sink. -------------------------------------------------------------------------------- /consumer/spring-redis-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-redis' 3 | api 'org.springframework.boot:spring-boot-starter-data-redis' 4 | } 5 | -------------------------------------------------------------------------------- /consumer/spring-redis-consumer/src/main/java/org/springframework/cloud/fn/consumer/redis/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Redis consumer auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.consumer.redis; 5 | -------------------------------------------------------------------------------- /consumer/spring-redis-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.redis.RedisConsumerConfiguration 2 | -------------------------------------------------------------------------------- /consumer/spring-redis-consumer/src/test/java/org/springframework/cloud/fn/consumer/redis/RedisConsumerQueueTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.consumer.redis; 18 | 19 | import java.util.concurrent.TimeUnit; 20 | 21 | import org.junit.jupiter.api.Test; 22 | 23 | import org.springframework.messaging.Message; 24 | import org.springframework.messaging.support.MessageBuilder; 25 | import org.springframework.test.context.TestPropertySource; 26 | 27 | import static org.assertj.core.api.Assertions.assertThat; 28 | 29 | /** 30 | * @author Soby Chacko 31 | */ 32 | @TestPropertySource(properties = "redis.consumer.queue = test-queue") 33 | public class RedisConsumerQueueTests extends AbstractRedisConsumerTests { 34 | 35 | @Test 36 | public void testWithQueue() { 37 | Message message = MessageBuilder.withPayload("hello").build(); 38 | 39 | redisConsumer.accept(message); 40 | 41 | Object result = redisTemplate.boundListOps("test-queue").rightPop(5000, TimeUnit.MILLISECONDS); 42 | assertThat(result).isEqualTo("hello"); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /consumer/spring-redis-consumer/src/test/java/org/springframework/cloud/fn/consumer/redis/RedisTestContainerSupport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.consumer.redis; 18 | 19 | import java.time.Duration; 20 | 21 | import org.junit.jupiter.api.BeforeAll; 22 | import org.testcontainers.containers.GenericContainer; 23 | import org.testcontainers.junit.jupiter.Testcontainers; 24 | 25 | /** 26 | * Provides a static Redis Container that can be shared across test classes. 27 | * 28 | * @author Corneil du Plessis 29 | */ 30 | @Testcontainers(disabledWithoutDocker = true) 31 | public interface RedisTestContainerSupport { 32 | 33 | GenericContainer REDIS_CONTAINER = new GenericContainer<>("redis:7").withExposedPorts(6379) 34 | .withStartupTimeout(Duration.ofSeconds(120)) 35 | .withStartupAttempts(3); 36 | 37 | @BeforeAll 38 | static void startContainer() { 39 | REDIS_CONTAINER.start(); 40 | } 41 | 42 | static String getUri() { 43 | return "redis://localhost:" + REDIS_CONTAINER.getFirstMappedPort(); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /consumer/spring-rsocket-consumer/README.adoc: -------------------------------------------------------------------------------- 1 | = RSocket Consumer 2 | 3 | A consumer that allows you to communicate to an RSocket route using its fire and forget strategy of execution. 4 | The consumer uses the RSocket support from https://docs.spring.io/spring-framework/reference/rsocket.html#rsocket-requester[Spring Framework]. 5 | 6 | == Beans for injection 7 | 8 | The `RSocketConsumerConfiguration` auto-configuration provides the following beans: 9 | 10 | `Function>, Mono> rsocketFunctionsConsumer` 11 | 12 | You can use `rsocketFunctionsConsumer` as a qualifier when injecting. 13 | 14 | The returned `Mono` has to be subscribed. 15 | Or `Consumer>> rsocketConsumer` can be used instead which just does a `Mono.block()` before returning. 16 | 17 | == Configuration Options 18 | 19 | All configuration properties are prefixed with `rsocket.consumer`. 20 | 21 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/rsocket/RsocketConsumerProperties.java[RsocketConsumerProperties]. 22 | 23 | == Examples 24 | 25 | See this link:src/test/java/org/springframework/cloud/fn/consumer/rsocket/RsocketConsumerTests.java[test suite] for learning more about this consumer. 26 | 27 | == Other usage 28 | 29 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/rsocket-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream based RSocket Sink application. -------------------------------------------------------------------------------- /consumer/spring-rsocket-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.boot:spring-boot-starter-rsocket' 3 | } 4 | -------------------------------------------------------------------------------- /consumer/spring-rsocket-consumer/src/main/java/org/springframework/cloud/fn/consumer/rsocket/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Rsocket consumer auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.consumer.rsocket; 5 | -------------------------------------------------------------------------------- /consumer/spring-rsocket-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.rsocket.RsocketConsumerConfiguration 2 | -------------------------------------------------------------------------------- /consumer/spring-s3-consumer/README.adoc: -------------------------------------------------------------------------------- 1 | = AWS S3 Consumer 2 | 3 | A consumer that allows you to upload files to AWS S3. 4 | The consumer uses the AWS S3 support from Spring Integration and Spring Cloud AWS. 5 | 6 | == Beans for injection 7 | 8 | The `AwsS3ConsumerConfiguration` auto-configuration provides the following bean: 9 | 10 | `Consumer> s3Consumer` 11 | 12 | You can use `s3Consumer` as a qualifier when injecting. 13 | 14 | == Configuration Options 15 | 16 | All configuration properties are prefixed with `s3.consumer`. 17 | There are also properties that need to be used with the prefix `s3.common`. 18 | 19 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/s3/AwsS3ConsumerProperties.java[AwsS3ConsumerProperties] and `io.awspring.cloud.autoconfigure.s3.properties.S3Properties` & `io.awspring.cloud.autoconfigure.s3.properties.S3CrtClientProperties` from Spring Cloud AWS auto-configuration. 20 | 21 | == Examples 22 | 23 | See this link:src/test/java/org/springframework/cloud/fn/consumer/s3[test suite] for the various ways, this consumer is used. 24 | 25 | == Other usage 26 | 27 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/s3-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream based S3 Sink application. 28 | -------------------------------------------------------------------------------- /consumer/spring-s3-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-aws-s3-common') 3 | api project(':spring-file-common') 4 | api 'software.amazon.awssdk:s3-transfer-manager' 5 | 6 | testImplementation 'org.springframework:spring-web' 7 | } 8 | 9 | tasks.withType(JavaForkOptions) { 10 | jvmArgs '--add-opens', 'java.base/java.nio=ALL-UNNAMED' 11 | } 12 | -------------------------------------------------------------------------------- /consumer/spring-s3-consumer/src/main/java/org/springframework/cloud/fn/consumer/s3/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The S3 consumer auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.consumer.s3; 5 | -------------------------------------------------------------------------------- /consumer/spring-s3-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.s3.AwsS3ConsumerConfiguration 2 | -------------------------------------------------------------------------------- /consumer/spring-sftp-consumer/README.adoc: -------------------------------------------------------------------------------- 1 | = SFTP Consumer 2 | 3 | A consumer that allows you to SFTP files. 4 | 5 | == Beans for injection 6 | 7 | The `SftpConsumerConfiguration` auto-configuration provides the following bean: 8 | 9 | `Consumer> sftpConsumer` 10 | 11 | You can use `sftpConsumer` as a qualifier when injecting. 12 | 13 | == Configuration Options 14 | 15 | All configuration properties are prefixed with `sftp.consumer`. 16 | 17 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/sftp/SftpConsumerProperties.java[SftpConsumerProperties]. 18 | 19 | A `ComponentCustomizer` bean can be added in the target project to provide any custom options for the `SftpMessageHandlerSpec` configuration used by the `sftpConsumer`. 20 | 21 | == Tests 22 | 23 | See this link:src/test/java/org/springframework/cloud/fn/consumer/sftp[test suite] for the various ways, this consumer is used. 24 | 25 | == Other usage 26 | 27 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/sftp-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream application where it makes a SFTP sink. 28 | -------------------------------------------------------------------------------- /consumer/spring-sftp-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-sftp' 3 | 4 | testImplementation project(':spring-function-test-support') 5 | } 6 | -------------------------------------------------------------------------------- /consumer/spring-sftp-consumer/src/main/java/org/springframework/cloud/fn/consumer/sftp/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The SFTP consumer auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.consumer.sftp; 5 | -------------------------------------------------------------------------------- /consumer/spring-sftp-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.sftp.SftpConsumerConfiguration 2 | -------------------------------------------------------------------------------- /consumer/spring-tcp-consumer/README.adoc: -------------------------------------------------------------------------------- 1 | = TCP Consumer 2 | 3 | A consumer that allows you to send TCP messages. 4 | 5 | == Beans for injection 6 | 7 | The `TcpConsumerConfiguration` auto-configuration provides the following bean: 8 | 9 | `Consumer> tcpConsumer` 10 | 11 | You can use `tcpConsumer` as a qualifier when injecting. 12 | 13 | == Configuration Options 14 | 15 | All configuration properties are prefixed with `tcp.consumer`. 16 | 17 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/tcp/TcpConsumerProperties.java[TCPConsumerProperties]. 18 | 19 | == Tests 20 | 21 | See this link:src/test/java/org/springframework/cloud/fn/consumer/tcp[test suite] for the various ways, this consumer is used. 22 | 23 | == Other usage 24 | 25 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/tcp-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream application where it makes a TCP sink. -------------------------------------------------------------------------------- /consumer/spring-tcp-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-tcp-common') 3 | } 4 | -------------------------------------------------------------------------------- /consumer/spring-tcp-consumer/src/main/java/org/springframework/cloud/fn/consumer/tcp/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The TCP consumer auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.consumer.tcp; 5 | -------------------------------------------------------------------------------- /consumer/spring-tcp-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.tcp.TcpConsumerConfiguration 2 | -------------------------------------------------------------------------------- /consumer/spring-tcp-consumer/src/test/java/org/springframework/cloud/fn/consumer/tcp/CRLFTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.consumer.tcp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.integration.ip.tcp.serializer.ByteArrayCrLfSerializer; 22 | 23 | /** 24 | * @author Gary Russell 25 | */ 26 | public class CRLFTests extends AbstractTcpConsumerTests { 27 | 28 | @Test 29 | public void test() throws Exception { 30 | doTest(new ByteArrayCrLfSerializer()); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /consumer/spring-tcp-consumer/src/test/java/org/springframework/cloud/fn/consumer/tcp/L1Tests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.consumer.tcp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.integration.ip.tcp.serializer.ByteArrayLengthHeaderSerializer; 22 | import org.springframework.test.context.TestPropertySource; 23 | 24 | /** 25 | * @author Gary Russell 26 | */ 27 | @TestPropertySource(properties = { "tcp.consumer.encoder = L1" }) 28 | public class L1Tests extends AbstractTcpConsumerTests { 29 | 30 | @Test 31 | public void test() throws Exception { 32 | doTest(new ByteArrayLengthHeaderSerializer(1)); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /consumer/spring-tcp-consumer/src/test/java/org/springframework/cloud/fn/consumer/tcp/L2Tests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.consumer.tcp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.integration.ip.tcp.serializer.ByteArrayLengthHeaderSerializer; 22 | import org.springframework.test.context.TestPropertySource; 23 | 24 | /** 25 | * @author Gary Russell 26 | */ 27 | @TestPropertySource(properties = { "tcp.consumer.encoder = L2" }) 28 | public class L2Tests extends AbstractTcpConsumerTests { 29 | 30 | @Test 31 | public void test() throws Exception { 32 | doTest(new ByteArrayLengthHeaderSerializer(2)); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /consumer/spring-tcp-consumer/src/test/java/org/springframework/cloud/fn/consumer/tcp/L4Tests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.consumer.tcp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.integration.ip.tcp.serializer.ByteArrayLengthHeaderSerializer; 22 | import org.springframework.test.context.TestPropertySource; 23 | 24 | /** 25 | * @author Gary Russell 26 | */ 27 | @TestPropertySource(properties = { "tcp.consumer.encoder = L4" }) 28 | public class L4Tests extends AbstractTcpConsumerTests { 29 | 30 | @Test 31 | public void test() throws Exception { 32 | doTest(new ByteArrayLengthHeaderSerializer(4)); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /consumer/spring-tcp-consumer/src/test/java/org/springframework/cloud/fn/consumer/tcp/LFTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.consumer.tcp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.integration.ip.tcp.serializer.ByteArrayLfSerializer; 22 | import org.springframework.test.context.TestPropertySource; 23 | 24 | /** 25 | * @author Gary Russell 26 | */ 27 | @TestPropertySource(properties = { "tcp.consumer.encoder = LF" }) 28 | public class LFTests extends AbstractTcpConsumerTests { 29 | 30 | @Test 31 | public void test() throws Exception { 32 | doTest(new ByteArrayLfSerializer()); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /consumer/spring-tcp-consumer/src/test/java/org/springframework/cloud/fn/consumer/tcp/NULLTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.consumer.tcp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.integration.ip.tcp.serializer.ByteArraySingleTerminatorSerializer; 22 | import org.springframework.test.context.TestPropertySource; 23 | 24 | /** 25 | * @author Gary Russell 26 | */ 27 | @TestPropertySource(properties = { "tcp.consumer.encoder = NULL" }) 28 | public class NULLTests extends AbstractTcpConsumerTests { 29 | 30 | @Test 31 | public void test() throws Exception { 32 | doTest(new ByteArraySingleTerminatorSerializer((byte) 0)); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /consumer/spring-tcp-consumer/src/test/java/org/springframework/cloud/fn/consumer/tcp/RAWTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.consumer.tcp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.integration.ip.tcp.serializer.ByteArrayRawSerializer; 22 | import org.springframework.test.context.TestPropertySource; 23 | 24 | /** 25 | * @author Gary Russell 26 | */ 27 | @TestPropertySource(properties = { "tcp.consumer.encoder = RAW", "tcp.consumer.close = true" }) 28 | public class RAWTests extends AbstractTcpConsumerTests { 29 | 30 | @Test 31 | public void test() throws Exception { 32 | doTest(new ByteArrayRawSerializer()); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /consumer/spring-tcp-consumer/src/test/java/org/springframework/cloud/fn/consumer/tcp/STXETXTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.consumer.tcp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.integration.ip.tcp.serializer.ByteArrayStxEtxSerializer; 22 | import org.springframework.test.context.TestPropertySource; 23 | 24 | /** 25 | * @author Gary Russell 26 | */ 27 | @TestPropertySource(properties = { "tcp.consumer.encoder = STXETX" }) 28 | public class STXETXTests extends AbstractTcpConsumerTests { 29 | 30 | @Test 31 | public void test() throws Exception { 32 | doTest(new ByteArrayStxEtxSerializer()); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /consumer/spring-twitter-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-twitter-common') 3 | api project(':spring-payload-converter-function') 4 | } 5 | -------------------------------------------------------------------------------- /consumer/spring-twitter-consumer/src/main/java/org/springframework/cloud/fn/consumer/twitter/friendship/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Twitter friendship support classes. 3 | */ 4 | package org.springframework.cloud.fn.consumer.twitter.friendship; 5 | -------------------------------------------------------------------------------- /consumer/spring-twitter-consumer/src/main/java/org/springframework/cloud/fn/consumer/twitter/message/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Twitter messages support classes. 3 | */ 4 | package org.springframework.cloud.fn.consumer.twitter.message; 5 | -------------------------------------------------------------------------------- /consumer/spring-twitter-consumer/src/main/java/org/springframework/cloud/fn/consumer/twitter/status/update/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Twitter status update support classes. 3 | */ 4 | package org.springframework.cloud.fn.consumer.twitter.status.update; 5 | -------------------------------------------------------------------------------- /consumer/spring-twitter-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.twitter.friendship.TwitterFriendshipsConsumerConfiguration 2 | org.springframework.cloud.fn.consumer.twitter.message.TwitterMessageConsumerConfiguration 3 | org.springframework.cloud.fn.consumer.twitter.status.update.TwitterUpdateConsumerConfiguration 4 | -------------------------------------------------------------------------------- /consumer/spring-wavefront-consumer/README.adoc: -------------------------------------------------------------------------------- 1 | = Wavefront Consumer 2 | 3 | This module provides a Wavefront Consumer that can be reused and composed in other applications. 4 | 5 | == Beans for injection 6 | 7 | You can import the `WavefrontConsumerConfiguration` in the application and then inject the following bean. 8 | 9 | `wavefrontConsumer` 10 | 11 | You can use `wavefrontConsumer` as a qualifier when injecting. 12 | 13 | Type for injection: `Consumer>` 14 | 15 | You can ignore the return value from the function as this is a consumer and simply will send the data to Wavefront. 16 | 17 | == Configuration Options 18 | 19 | All configuration properties are prefixed with `wavefront`. 20 | 21 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/wavefront/WavefrontConsumerProperties.java[WavefrontConsumerProperties]. 22 | 23 | == Tests 24 | 25 | See this link:src/test/java/org/springframework/cloud/fn/consumer/wavefront[test suite] for the various ways, this consumer is used. 26 | 27 | == Other usage 28 | 29 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/wavefront-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream application where it makes a Wavefront sink. 30 | -------------------------------------------------------------------------------- /consumer/spring-wavefront-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.boot:spring-boot-starter-web' 3 | } 4 | -------------------------------------------------------------------------------- /consumer/spring-wavefront-consumer/src/main/java/org/springframework/cloud/fn/consumer/wavefront/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Wavefront consumer classes. 3 | */ 4 | package org.springframework.cloud.fn.consumer.wavefront; 5 | -------------------------------------------------------------------------------- /consumer/spring-wavefront-consumer/src/main/java/org/springframework/cloud/fn/consumer/wavefront/service/WavefrontService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.consumer.wavefront.service; 18 | 19 | /** 20 | * The abstraction for Wavefront communication. 21 | * 22 | * @author Timo Salm 23 | */ 24 | public interface WavefrontService { 25 | 26 | void send(String metricInWavefrontFormat); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /consumer/spring-wavefront-consumer/src/main/java/org/springframework/cloud/fn/consumer/wavefront/service/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Wavefront service API. 3 | */ 4 | package org.springframework.cloud.fn.consumer.wavefront.service; 5 | -------------------------------------------------------------------------------- /consumer/spring-wavefront-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.wavefront.WavefrontConsumerConfiguration 2 | -------------------------------------------------------------------------------- /consumer/spring-websocket-consumer/README.adoc: -------------------------------------------------------------------------------- 1 | = Websocket Consumer 2 | 3 | A consumer that allows you to send messages using websocket. 4 | 5 | == Beans for injection 6 | 7 | The `WebsocketConsumerConfiguration` auto-configuration provides the following bean: 8 | 9 | `Consumer> websocketConsumer` 10 | 11 | You can use `websocketConsumer` as a qualifier when injecting. 12 | 13 | == Configuration Options 14 | 15 | All configuration properties are prefixed with `websocket.consumer`. 16 | 17 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/websocket/WebsocketConsumerProperties.java[WebsocketConsumerProperties]. 18 | 19 | == Tests 20 | 21 | See this link:src/test/java/org/springframework/cloud/fn/consumer/websocket[test suite] for the various ways, this consumer is used. 22 | 23 | == Other usage 24 | 25 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/websocket-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream application where it makes a TCP sink. -------------------------------------------------------------------------------- /consumer/spring-websocket-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.boot:spring-boot-starter-actuator' 3 | api 'org.springframework:spring-websocket' 4 | api 'io.netty:netty-all' 5 | 6 | testImplementation 'org.springframework.boot:spring-boot-starter-web' 7 | testImplementation project(':spring-function-test-support') 8 | } 9 | -------------------------------------------------------------------------------- /consumer/spring-websocket-consumer/src/main/java/org/springframework/cloud/fn/consumer/websocket/actuator/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The WebSocket consumer actuator support. 3 | */ 4 | package org.springframework.cloud.fn.consumer.websocket.actuator; 5 | -------------------------------------------------------------------------------- /consumer/spring-websocket-consumer/src/main/java/org/springframework/cloud/fn/consumer/websocket/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The WebSocket consumer auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.consumer.websocket; 5 | -------------------------------------------------------------------------------- /consumer/spring-websocket-consumer/src/main/java/org/springframework/cloud/fn/consumer/websocket/trace/Trace.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.consumer.websocket.trace; 18 | 19 | import java.util.Date; 20 | import java.util.Map; 21 | 22 | /** 23 | * A value object representing a trace event: at a particular time with a simple (map) 24 | * information. Can be used for analyzing contextual information such as HTTP headers. 25 | * 26 | *

27 | * It is a copy of {@code InMemoryTraceRepository} from Spring Boot 1.5.x. Since Spring 28 | * Boot 2.0 traces are only available for HTTP. 29 | * 30 | * @param timestamp the time for trace. 31 | * @param info the map of that tags for trace. 32 | * @author Dave Syer 33 | * @author Artem Bilan 34 | * @since 2.0 35 | */ 36 | public record Trace(Date timestamp, Map info) { 37 | 38 | } 39 | -------------------------------------------------------------------------------- /consumer/spring-websocket-consumer/src/main/java/org/springframework/cloud/fn/consumer/websocket/trace/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The WebSocket consumer tracing support. 3 | */ 4 | package org.springframework.cloud.fn.consumer.websocket.trace; 5 | -------------------------------------------------------------------------------- /consumer/spring-websocket-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.websocket.WebsocketConsumerConfiguration -------------------------------------------------------------------------------- /consumer/spring-websocket-consumer/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /consumer/spring-xmpp-consumer/README.adoc: -------------------------------------------------------------------------------- 1 | = XMPP Consumer 2 | 3 | A consumer that allows you to send messages through an XMPP server. 4 | 5 | == Beans for injection 6 | 7 | You can import the `XmppConsumerConfiguration` in the application and then inject the following bean. 8 | 9 | `Consumer xmppConsumer` 10 | 11 | You need to inject this as `Consumer xmppConsumer`. 12 | 13 | You can use `xmppConsumer` as a qualifier when injecting. 14 | 15 | **NOTE:** This is a functional endpoint. One will need to subscribe to this endpoint in order to start accepting data 16 | on it. 17 | 18 | == Configuration Options 19 | 20 | All configuration properties are prefixed with `xmpp.consumer`. 21 | 22 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/xmpp/XmppConsumerProperties.java[XmppConsumerProperties]. 23 | 24 | == Tests 25 | 26 | See this link:src/test/java/org/springframework/cloud/fn/consumer/xmpp/[test suite] for the various ways, this consumer is used. 27 | 28 | == Other usage 29 | 30 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/xmpp-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream application where it makes a XMPP Sink. 31 | -------------------------------------------------------------------------------- /consumer/spring-xmpp-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-xmpp-common') 3 | 4 | testImplementation project(':spring-function-test-support') 5 | } 6 | -------------------------------------------------------------------------------- /consumer/spring-xmpp-consumer/src/main/java/org/springframework/cloud/fn/consumer/xmpp/XmppConsumerProperties.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.consumer.xmpp; 18 | 19 | import org.springframework.boot.context.properties.ConfigurationProperties; 20 | import org.springframework.validation.annotation.Validated; 21 | 22 | /** 23 | * Properties for XMPP consumer. 24 | * 25 | * @author Daniel Frey 26 | * @since 4.0.0 27 | */ 28 | @ConfigurationProperties("xmpp.consumer") 29 | @Validated 30 | public class XmppConsumerProperties { 31 | 32 | /** 33 | * XMPP handle to send message to. 34 | */ 35 | private String chatTo; 36 | 37 | public void setChatTo(String chatTo) { 38 | this.chatTo = chatTo; 39 | } 40 | 41 | public String getChatTo() { 42 | return this.chatTo; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /consumer/spring-xmpp-consumer/src/main/java/org/springframework/cloud/fn/consumer/xmpp/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The XMPP consumer classes. 3 | */ 4 | package org.springframework.cloud.fn.consumer.xmpp; 5 | -------------------------------------------------------------------------------- /consumer/spring-xmpp-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.xmpp.XmppConsumerConfiguration 2 | -------------------------------------------------------------------------------- /consumer/spring-zeromq-consumer/README.adoc: -------------------------------------------------------------------------------- 1 | = ZeroMQ Consumer 2 | 3 | A consumer that allows you to send messages through a ZeroMQ socker. 4 | 5 | == Beans for injection 6 | 7 | You can import the `ZeroMqConsumerConfiguration` in the application and then inject the following bean. 8 | 9 | `Function>, Mono> zeromqConsumer` 10 | 11 | You need to inject this as `Function>, Mono> zeromqConsumer`. 12 | 13 | You can use `zeromqConsumer` as a qualifier when injecting. 14 | 15 | **NOTE:** This is a functional endpoint. One will need to subscribe to this endpoint in order to start accepting data on it. 16 | 17 | == Configuration Options 18 | 19 | All configuration properties are prefixed with `zeromq.consumer`. 20 | 21 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/zeromq/ZeroMqConsumerProperties.java[ZeroMqConsumerProperties]. 22 | 23 | == Tests 24 | 25 | See this link:src/test/java/org/springframework/cloud/fn/consumer/zeromq/[test suite] for the various ways, this consumer is used. 26 | 27 | == Other usage 28 | 29 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/zeromq-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream application where it makes a ZeroMQ Sink. 30 | -------------------------------------------------------------------------------- /consumer/spring-zeromq-consumer/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-zeromq' 3 | } 4 | -------------------------------------------------------------------------------- /consumer/spring-zeromq-consumer/src/main/java/org/springframework/cloud/fn/consumer/zeromq/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The ZeroMQ consumer auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.consumer.zeromq; 5 | -------------------------------------------------------------------------------- /consumer/spring-zeromq-consumer/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.consumer.zeromq.ZeroMqConsumerConfiguration 2 | -------------------------------------------------------------------------------- /dependencies.gradle: -------------------------------------------------------------------------------- 1 | ext { 2 | springBootVersion = '3.4.6' 3 | springCloudAwsVersion = '3.2.1' 4 | 5 | debeziumVersion = '3.0.8.Final' 6 | djlVersion = '0.26.0' 7 | 8 | springIntegrationAws = 'org.springframework.integration:spring-integration-aws:3.0.9' 9 | ftpServerCore = 'org.apache.ftpserver:ftpserver-core:1.2.1' 10 | mockServerNetty = 'org.mock-server:mockserver-netty:5.15.0' 11 | } 12 | -------------------------------------------------------------------------------- /etc/checkstyle/checkstyle-suppressions.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /etc/checkstyle/checkstyle.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /function/spring-aggregator-function/README.adoc: -------------------------------------------------------------------------------- 1 | = Aggregator Function 2 | 3 | This module provides an aggregation function that can be reused and composed in other applications. 4 | 5 | == Beans for injection 6 | 7 | You can import the `AggregatorFunctionConfiguration` in a Spring Boot application and then inject the following bean. 8 | 9 | `aggregatorFunction` 10 | 11 | You can use `aggregatorFunction` as a qualifier when injecting. 12 | 13 | Once injected, you can use the `apply` method of the `Function` to invoke it and get the result. 14 | 15 | == Configuration Options 16 | 17 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/aggregator/AggregatorFunctionProperties.java[AggregatorFunctionProperties.java] 18 | 19 | A `ComponentCustomizer` bean can be added in the target project to provide any custom options for the `AggregatorFactoryBean` configuration used by the `aggregatorFunction` definition. 20 | 21 | == Tests 22 | 23 | See this link:src/test/java/org/springframework/cloud/fn/aggregator/AbstractAggregatorFunctionTests.java[test suite] for examples of how this function is used. 24 | 25 | == Other usage 26 | 27 | See this https://github.com/spring-cloud/stream-applications/blob/main/applications/processor/aggregator-processor/README.adoc[README] where this function is used to create a Spring Cloud Stream application. 28 | -------------------------------------------------------------------------------- /function/spring-aggregator-function/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-payload-converter-function') 3 | api 'org.springframework.integration:spring-integration-mongodb' 4 | api 'org.springframework.integration:spring-integration-redis' 5 | api 'org.springframework.integration:spring-integration-jdbc' 6 | 7 | runtimeOnly 'org.springframework.boot:spring-boot-starter-data-redis' 8 | runtimeOnly 'org.springframework.boot:spring-boot-starter-data-mongodb' 9 | runtimeOnly 'org.springframework.boot:spring-boot-starter-jdbc' 10 | runtimeOnly 'org.hsqldb:hsqldb' 11 | runtimeOnly 'com.h2database:h2' 12 | runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' 13 | runtimeOnly 'org.postgresql:postgresql' 14 | 15 | testImplementation 'org.testcontainers:mongodb' 16 | testImplementation project(':spring-mongodb-consumer').sourceSets.test.output 17 | testImplementation project(':spring-redis-consumer').sourceSets.test.output 18 | } 19 | -------------------------------------------------------------------------------- /function/spring-aggregator-function/src/main/java/org/springframework/cloud/fn/aggregator/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The aggregator function support classes. 3 | */ 4 | package org.springframework.cloud.fn.aggregator; 5 | -------------------------------------------------------------------------------- /function/spring-aggregator-function/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.env.EnvironmentPostProcessor=\ 2 | org.springframework.cloud.fn.aggregator.ExcludeStoresAutoConfigurationEnvironmentPostProcessor 3 | -------------------------------------------------------------------------------- /function/spring-aggregator-function/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.aggregator.AggregatorFunctionConfiguration 2 | -------------------------------------------------------------------------------- /function/spring-computer-vision-function/build.gradle: -------------------------------------------------------------------------------- 1 | ext { 2 | djlSpringVersion = '0.26' 3 | } 4 | 5 | dependencies { 6 | api "ai.djl.spring:djl-spring-boot-starter-autoconfigure:$djlSpringVersion" 7 | api "ai.djl.spring:djl-spring-boot-starter-tensorflow-auto:$djlSpringVersion" 8 | api "ai.djl.spring:djl-spring-boot-starter-pytorch-auto:$djlSpringVersion" 9 | api "ai.djl.spring:djl-spring-boot-starter-mxnet-auto:$djlSpringVersion" 10 | runtimeOnly 'ai.djl.onnxruntime:onnxruntime-engine' 11 | } 12 | -------------------------------------------------------------------------------- /function/spring-computer-vision-function/src/main/java/org/springframework/cloud/fn/computer/vision/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides classes for the Computer Vision Function. 3 | */ 4 | package org.springframework.cloud.fn.computer.vision; 5 | -------------------------------------------------------------------------------- /function/spring-computer-vision-function/src/main/java/org/springframework/cloud/fn/computer/vision/translator/TensorflowSavedModelObjectDetectionTranslatorFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2024-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.computer.vision.translator; 18 | 19 | import java.util.Map; 20 | 21 | import ai.djl.Model; 22 | import ai.djl.modality.cv.Image; 23 | import ai.djl.modality.cv.output.DetectedObjects; 24 | import ai.djl.modality.cv.translator.ObjectDetectionTranslatorFactory; 25 | import ai.djl.translate.Translator; 26 | 27 | /** 28 | * Translator for TensorFlow Object Detection SavedModel. 29 | * 30 | * @author Christian Tzolov 31 | */ 32 | public class TensorflowSavedModelObjectDetectionTranslatorFactory extends ObjectDetectionTranslatorFactory { 33 | 34 | @Override 35 | protected Translator buildBaseTranslator(Model model, Map arguments) { 36 | return new TensorflowSavedModelObjectDetectionTranslator(); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /function/spring-computer-vision-function/src/main/java/org/springframework/cloud/fn/computer/vision/translator/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides classes for translating the output of the computer vision function. 3 | */ 4 | package org.springframework.cloud.fn.computer.vision.translator; 5 | -------------------------------------------------------------------------------- /function/spring-computer-vision-function/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.computer.vision.ComputerVisionFunctionConfiguration 2 | -------------------------------------------------------------------------------- /function/spring-computer-vision-function/src/test/resources/amsterdam-cityscape.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-cloud/spring-functions-catalog/9a42b71aef92b6135a527385e4361d31e7318c23/function/spring-computer-vision-function/src/test/resources/amsterdam-cityscape.jpg -------------------------------------------------------------------------------- /function/spring-computer-vision-function/src/test/resources/karakatschan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-cloud/spring-functions-catalog/9a42b71aef92b6135a527385e4361d31e7318c23/function/spring-computer-vision-function/src/test/resources/karakatschan.jpg -------------------------------------------------------------------------------- /function/spring-computer-vision-function/src/test/resources/object-detection.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-cloud/spring-functions-catalog/9a42b71aef92b6135a527385e4361d31e7318c23/function/spring-computer-vision-function/src/test/resources/object-detection.jpg -------------------------------------------------------------------------------- /function/spring-computer-vision-function/src/test/resources/pose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-cloud/spring-functions-catalog/9a42b71aef92b6135a527385e4361d31e7318c23/function/spring-computer-vision-function/src/test/resources/pose.png -------------------------------------------------------------------------------- /function/spring-computer-vision-function/src/test/resources/test1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-cloud/spring-functions-catalog/9a42b71aef92b6135a527385e4361d31e7318c23/function/spring-computer-vision-function/src/test/resources/test1.png -------------------------------------------------------------------------------- /function/spring-filter-function/README.adoc: -------------------------------------------------------------------------------- 1 | = Filter Function 2 | 3 | This module provides a filter function that can be reused and composed in other applications. 4 | 5 | == Beans for injection 6 | 7 | The `FilterFunctionConfiguration` auto-configuration provides following bean: 8 | 9 | `filterFunction` 10 | 11 | You can use `filterFunction` as a qualifier when injecting. 12 | 13 | Once injected, you can use the `apply` method of the `Function` to invoke it and get the result. 14 | 15 | == Configuration Options 16 | 17 | All configuration properties are prefixed with `filter.function`. 18 | 19 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/filter/FilterFunctionProperties.java[FilterFunctionProperties.java] 20 | 21 | == Examples 22 | 23 | See this link:src/test/java/org/springframework/cloud/fn/filter/FilterFunctionApplicationTests.java[test suite] for examples of how this function is used. 24 | 25 | == Other usage 26 | 27 | See this https://github.com/spring-cloud/stream-applications/blob/main/applications/processor/filter-processor/README.adoc[README] where this function is used to create a Spring Cloud Stream application. -------------------------------------------------------------------------------- /function/spring-filter-function/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-payload-converter-function') 3 | } 4 | -------------------------------------------------------------------------------- /function/spring-filter-function/src/main/java/org/springframework/cloud/fn/filter/FilterFunctionProperties.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.filter; 18 | 19 | import org.springframework.boot.context.properties.ConfigurationProperties; 20 | import org.springframework.expression.Expression; 21 | import org.springframework.integration.expression.ValueExpression; 22 | 23 | /** 24 | * Configuration properties for the SpEL function. 25 | * 26 | * @author Gary Russell 27 | * @author Artem Bilan 28 | */ 29 | @ConfigurationProperties("filter.function") 30 | public class FilterFunctionProperties { 31 | 32 | /** 33 | * Boolean SpEL expression to apply against request message to filter. 34 | */ 35 | private Expression expression = new ValueExpression<>(true); 36 | 37 | public Expression getExpression() { 38 | return this.expression; 39 | } 40 | 41 | public void setExpression(Expression expression) { 42 | this.expression = expression; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /function/spring-filter-function/src/main/java/org/springframework/cloud/fn/filter/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Filter function support classes. 3 | */ 4 | package org.springframework.cloud.fn.filter; 5 | -------------------------------------------------------------------------------- /function/spring-filter-function/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.filter.FilterFunctionConfiguration 2 | -------------------------------------------------------------------------------- /function/spring-header-enricher-function/README.adoc: -------------------------------------------------------------------------------- 1 | = Header Enricher Function 2 | 3 | This module provides a header enricher function that can be reused and composed in other applications. 4 | 5 | == Beans for injection 6 | 7 | The `HeaderEnricherFunctionConfiguration` auto-configuration provides the following bean: 8 | 9 | `headerEnricherFunction` 10 | 11 | You can use `headerEnricherFunction` as a qualifier when injecting. 12 | 13 | Once injected, you can use the `apply` method of the `Function` to invoke it and get the result. 14 | 15 | == Configuration Options 16 | 17 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/header/enricher/HeaderEnricherFunctionProperties.java[HeaderEnricherFunctionProperties.java] 18 | 19 | == Tests 20 | 21 | See this link:src/test/java/org/springframework/cloud/fn/header/enricher/HeaderEnricherFunctionApplicationTests.java[test suite] for examples of how this function is used. 22 | 23 | == Other usage 24 | 25 | See this https://github.com/spring-cloud/stream-applications/blob/main/applications/processor/header-enricher-processor/README.adoc[README] where this function is used to create a Spring Cloud Stream application. -------------------------------------------------------------------------------- /function/spring-header-enricher-function/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-payload-converter-function') 3 | } 4 | -------------------------------------------------------------------------------- /function/spring-header-enricher-function/src/main/java/org/springframework/cloud/fn/header/enricher/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Header Enricher function support classes. 3 | */ 4 | package org.springframework.cloud.fn.header.enricher; 5 | -------------------------------------------------------------------------------- /function/spring-header-enricher-function/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.header.enricher.HeaderEnricherFunctionConfiguration 2 | -------------------------------------------------------------------------------- /function/spring-header-filter-function/README.adoc: -------------------------------------------------------------------------------- 1 | = Header Filter Function 2 | 3 | This module provides a header filter function that can be reused and composed in other applications. 4 | 5 | == Beans for injection 6 | 7 | The `HeaderFilterFunctionConfiguration` auto-configuration provides the following bean: 8 | 9 | `headerFilterFunction` 10 | 11 | You can use `headerFilterFunction` as a qualifier when injecting. 12 | 13 | Once injected, you can use the `apply` method of the `Function` to invoke it and get the result. 14 | 15 | == Configuration Options 16 | 17 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/header/filter/HeaderFilterFunctionProperties.java[HeaderFilterFunctionProperties.java] 18 | 19 | == Tests 20 | 21 | See this link:src/test/java/org/springframework/cloud/fn/header/filter/HeaderFilterFunctionApplicationTests.java[test suite] for examples of how this function is used. 22 | 23 | == Other usage 24 | 25 | See this https://github.com/spring-cloud/stream-applications/blob/main/applications/processor/header-filter-processor/README.adoc[README] where this function is used to create a Spring Cloud Stream application. 26 | -------------------------------------------------------------------------------- /function/spring-header-filter-function/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-payload-converter-function') 3 | } 4 | -------------------------------------------------------------------------------- /function/spring-header-filter-function/src/main/java/org/springframework/cloud/fn/header/filter/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Header Filter function support classes. 3 | */ 4 | package org.springframework.cloud.fn.header.filter; 5 | -------------------------------------------------------------------------------- /function/spring-header-filter-function/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.header.filter.HeaderFilterFunctionConfiguration 2 | -------------------------------------------------------------------------------- /function/spring-header-filter-function/src/test/java/org/springframework/cloud/fn/header/filter/HeaderUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2023-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.header.filter; 18 | 19 | import java.util.HashSet; 20 | import java.util.Set; 21 | 22 | import org.jetbrains.annotations.NotNull; 23 | 24 | import org.springframework.integration.IntegrationMessageHeaderAccessor; 25 | import org.springframework.messaging.Message; 26 | 27 | public final class HeaderUtils { 28 | 29 | private HeaderUtils() { 30 | } 31 | 32 | @NotNull 33 | public static Set getNonReadOnlyHeaders(Message message) { 34 | var headers = new HashSet<>(message.getHeaders().keySet()); 35 | var accessor = new IntegrationMessageHeaderAccessor(message); 36 | headers.removeIf(accessor::isReadOnly); 37 | return headers; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /function/spring-http-request-function/README.adoc: -------------------------------------------------------------------------------- 1 | = HTTP Request Function 2 | 3 | This module provides an HTTP request function that can be reused and composed in other applications. 4 | The `Function` uses the reactive `WebClient` from `Spring WebFlux` and is implemented as a `java.util.function.Function`. 5 | This function gives you a reactive stream of `ResponseEntity` given a stream of request messages as the function a signature of `Function,ResponseEntity>`. 6 | Users have to subscribe to the returned `Flux` to receive the data. 7 | 8 | == Beans for injection 9 | 10 | The `HttpRequestFunction` auto-configuration provides the following bean: 11 | 12 | `httpRequestFunction` 13 | 14 | You may inject this as `HttpRequestFunction`. 15 | 16 | You can use `httpRequestFunction` as a qualifier when injecting. 17 | 18 | Once injected, you can use the `apply` method of the `Function` to invoke it and then subscribe to the returned `Flux`. 19 | 20 | == Configuration Options 21 | 22 | All configuration properties are prefixed with `http.request`. 23 | 24 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/http/request/HttpRequestFunctionProperties.java[HttpRequestFunctionProperties.java] 25 | 26 | == Examples 27 | 28 | See this link:src/test/java/org/springframework/cloud/fn/http/request/HttpRequestFunctionTests.java[test suite] for examples of how this function is used. 29 | 30 | == Other usage 31 | 32 | See this https://github.com/spring-cloud/stream-applications/blob/main/applications/processor/http-request-processor/README.adoc[README] where this function is used to create a Spring Cloud Stream application to process HTTP requests. -------------------------------------------------------------------------------- /function/spring-http-request-function/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.boot:spring-boot-starter-webflux' 3 | 4 | testImplementation 'com.squareup.okhttp3:mockwebserver:4.12.0' 5 | } 6 | -------------------------------------------------------------------------------- /function/spring-http-request-function/src/main/java/org/springframework/cloud/fn/http/request/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The HTTP function auto-configuration. 3 | */ 4 | package org.springframework.cloud.fn.http.request; 5 | -------------------------------------------------------------------------------- /function/spring-http-request-function/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.http.request.HttpRequestFunctionConfiguration 2 | -------------------------------------------------------------------------------- /function/spring-payload-converter-function/src/main/java/functions/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The utility functions for common usage. 3 | */ 4 | package functions; 5 | -------------------------------------------------------------------------------- /function/spring-spel-function/README.adoc: -------------------------------------------------------------------------------- 1 | = SpEL Function 2 | 3 | This module provides a SpEL function that can be reused and composed in other applications. 4 | The function can be used to apply SpEL transformations on data based on a SpEL expression. 5 | 6 | == Beans for injection 7 | 8 | The `SpelFunctionConfiguration` auto-configuration provides the following bean: 9 | 10 | `spelFunction` 11 | 12 | You can use `spelFunction` as a qualifier when injecting. 13 | 14 | Once injected, you can use the `apply` method of the `Function` to invoke it and get the result. 15 | 16 | == Configuration Options 17 | 18 | All configuration properties are prefixed with `spel`. 19 | 20 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/spel/SpelFunctionProperties.java[SpelFunctionProperties.java] 21 | 22 | == Tests 23 | 24 | See this link:src/test/java/org/springframework/cloud/fn/spel/SpelFunctionApplicationTests.java[test suite] for examples of how this function is used. 25 | 26 | == Other usage 27 | 28 | See this https://github.com/spring-cloud/stream-applications/blob/main/applications/processor/transform-processor/README.adoc[README] where this function is used to create a Spring Cloud Stream transformer application. -------------------------------------------------------------------------------- /function/spring-spel-function/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-payload-converter-function') 3 | } 4 | -------------------------------------------------------------------------------- /function/spring-spel-function/src/main/java/org/springframework/cloud/fn/spel/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The SpEL function auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.spel; 5 | -------------------------------------------------------------------------------- /function/spring-spel-function/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.spel.SpelFunctionConfiguration 2 | -------------------------------------------------------------------------------- /function/spring-splitter-function/README.adoc: -------------------------------------------------------------------------------- 1 | = Splitter Function 2 | 3 | This module provides a splitter function that can be reused and composed in other applications. 4 | 5 | == Beans for injection 6 | 7 | The `SpliiterFunctionConfiguration` auto-configuration provides the following bean: 8 | 9 | `splitterFunction` 10 | 11 | You can use `splitterFunction` as a qualifier when injecting. 12 | 13 | Once injected, you can use the `apply` method of the `Function` to invoke it and get the result. 14 | 15 | == Configuration Options 16 | 17 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/splitter/SplitterFunctionProperties.java[SplitterFunctionProperties.java] 18 | 19 | == Tests 20 | 21 | See this link:src/test/java/org/springframework/cloud/fn/splitter/SplitterFunctionApplicationTests.java[test suite] for examples of how this function is used. 22 | 23 | == Other usage 24 | 25 | See this https://github.com/spring-cloud/stream-applications/blob/main/applications/processor/splitter-processor/README.adoc[README] where this function is used to create a Spring Cloud Stream application. -------------------------------------------------------------------------------- /function/spring-splitter-function/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-file' 3 | } 4 | -------------------------------------------------------------------------------- /function/spring-splitter-function/src/main/java/org/springframework/cloud/fn/splitter/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Splitter function auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.splitter; 5 | -------------------------------------------------------------------------------- /function/spring-splitter-function/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.splitter.SplitterFunctionConfiguration 2 | -------------------------------------------------------------------------------- /function/spring-task-launch-request-function/README.adoc: -------------------------------------------------------------------------------- 1 | = Task Launch Request Function 2 | 3 | This module provides a function that can be reused and composed in other applications to transform the output to a link:src/main/java/org/springframework/cloud/fn/task/launch/request/TaskLaunchRequest.java[TaskLaunchRequest] 4 | that can be used as input to the TaskLauncher function to launch a task. 5 | 6 | == Beans for injection 7 | 8 | The `TaskLaunchRequestFunctionConfiguration` auto-configuration provides the following bean: 9 | 10 | `taskLaunchRequestFunction` as a link:src/main/java/org/springframework/cloud/fn/task/launch/request/TaskLaunchRequestFunction.java[TaskLaunchRequestFunction]. 11 | 12 | You can use `taskLaunchRequestFunction` as a qualifier when injecting. 13 | 14 | Once injected, you can use the `apply` method of the `Function` to invoke it and get the result. 15 | 16 | == Configuration Options 17 | 18 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/task/launch/request/TaskLaunchRequestFunctionProperties.java[TaskLaunchRequestFunctionProperties.java] 19 | 20 | == Examples 21 | 22 | See this link:src/test/java/org/springframework/cloud/fn/task/launch/request/TaskLaunchRequestFunctionApplicationTests.java[test suite] for examples of how this function is used. 23 | -------------------------------------------------------------------------------- /function/spring-task-launch-request-function/src/main/java/org/springframework/cloud/fn/task/launch/request/CommandLineArgumentsMessageMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.task.launch.request; 18 | 19 | import java.util.Collection; 20 | 21 | import org.springframework.integration.handler.MessageProcessor; 22 | 23 | public interface CommandLineArgumentsMessageMapper extends MessageProcessor> { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /function/spring-task-launch-request-function/src/main/java/org/springframework/cloud/fn/task/launch/request/TaskLaunchRequestFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.task.launch.request; 18 | 19 | import java.util.function.Function; 20 | 21 | import org.springframework.messaging.Message; 22 | 23 | /** 24 | * A marker interface useful for unambiguous dependency injection of this Function. 25 | * 26 | * @author David Turanski 27 | **/ 28 | @FunctionalInterface 29 | public interface TaskLaunchRequestFunction extends Function, Message> { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /function/spring-task-launch-request-function/src/main/java/org/springframework/cloud/fn/task/launch/request/TaskNameMessageMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.task.launch.request; 18 | 19 | import org.springframework.integration.handler.MessageProcessor; 20 | 21 | @FunctionalInterface 22 | public interface TaskNameMessageMapper extends MessageProcessor { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /function/spring-task-launch-request-function/src/main/java/org/springframework/cloud/fn/task/launch/request/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Task Launcher function auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.task.launch.request; 5 | -------------------------------------------------------------------------------- /function/spring-task-launch-request-function/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.task.launch.request.TaskLaunchRequestFunctionConfiguration 2 | -------------------------------------------------------------------------------- /function/spring-twitter-function/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-twitter-common') 3 | 4 | testImplementation mockServerNetty 5 | } 6 | -------------------------------------------------------------------------------- /function/spring-twitter-function/src/main/java/org/springframework/cloud/fn/twitter/geo/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Twitter Geo function auto-configuration. 3 | */ 4 | package org.springframework.cloud.fn.twitter.geo; 5 | -------------------------------------------------------------------------------- /function/spring-twitter-function/src/main/java/org/springframework/cloud/fn/twitter/trend/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Twitter Trend function auto-configuration. 3 | */ 4 | package org.springframework.cloud.fn.twitter.trend; 5 | -------------------------------------------------------------------------------- /function/spring-twitter-function/src/main/java/org/springframework/cloud/fn/twitter/users/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Twitter Users function auto-configuration. 3 | */ 4 | package org.springframework.cloud.fn.twitter.users; 5 | -------------------------------------------------------------------------------- /function/spring-twitter-function/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.twitter.geo.TwitterGeoFunctionConfiguration 2 | org.springframework.cloud.fn.twitter.trend.TwitterTrendFunctionConfiguration 3 | org.springframework.cloud.fn.twitter.users.TwitterUsersFunctionConfiguration 4 | -------------------------------------------------------------------------------- /function/spring-twitter-function/src/test/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | version=5.1.1-SNAPSHOT 2 | org.gradle.jvmargs=-Xmx1536M -Dfile.encoding=UTF-8 3 | org.gradle.caching=true 4 | org.gradle.parallel=true 5 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-cloud/spring-functions-catalog/9a42b71aef92b6135a527385e4361d31e7318c23/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionSha256Sum=7a00d51fb93147819aab76024feece20b6b84e420694101f276be952e08bef03 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip 5 | networkTimeout=10000 6 | validateDistributionUrl=true 7 | zipStoreBase=GRADLE_USER_HOME 8 | zipStorePath=wrapper/dists 9 | -------------------------------------------------------------------------------- /samples/time-spel-log/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'java' 3 | id 'org.springframework.boot' version '3.4.6' 4 | id 'io.spring.dependency-management' version '1.1.7' 5 | } 6 | 7 | group = 'com.example' 8 | version = '0.0.1-SNAPSHOT' 9 | 10 | java { 11 | sourceCompatibility = '17' 12 | } 13 | 14 | repositories { 15 | mavenCentral() 16 | maven { url 'https://repo.spring.io/snapshot' } 17 | } 18 | 19 | ext { 20 | springCloudVersion = '2024.0.2-SNAPSHOT' 21 | springFunctionsCatalogVersion = '5.1.0' 22 | } 23 | 24 | dependencyManagement { 25 | imports { 26 | mavenBom "org.springframework.cloud:spring-cloud-dependencies:$springCloudVersion" 27 | mavenBom "org.springframework.cloud.fn:spring-functions-catalog-bom:$springFunctionsCatalogVersion" 28 | } 29 | } 30 | 31 | dependencies { 32 | implementation 'org.springframework.boot:spring-boot-starter' 33 | implementation 'org.springframework.cloud:spring-cloud-function-context' 34 | implementation 'org.springframework.cloud.fn:spring-time-supplier' 35 | implementation 'org.springframework.cloud.fn:spring-spel-function' 36 | implementation 'org.springframework.cloud.fn:spring-log-consumer' 37 | 38 | testImplementation 'org.springframework.boot:spring-boot-starter-test' 39 | } 40 | 41 | 42 | tasks.named('test') { 43 | useJUnitPlatform() 44 | } 45 | -------------------------------------------------------------------------------- /samples/time-spel-log/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-cloud/spring-functions-catalog/9a42b71aef92b6135a527385e4361d31e7318c23/samples/time-spel-log/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /samples/time-spel-log/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /samples/time-spel-log/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'time-spel-log' 2 | -------------------------------------------------------------------------------- /samples/time-spel-log/src/main/java/com/example/TimeSpelLogApplication.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import jakarta.annotation.PostConstruct; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.boot.SpringApplication; 7 | import org.springframework.boot.autoconfigure.SpringBootApplication; 8 | import org.springframework.cloud.function.context.FunctionCatalog; 9 | import org.springframework.scheduling.annotation.EnableScheduling; 10 | import org.springframework.scheduling.annotation.Scheduled; 11 | 12 | @EnableScheduling 13 | @SpringBootApplication 14 | public class TimeSpelLogApplication { 15 | 16 | public static void main(String[] args) { 17 | SpringApplication.run(TimeSpelLogApplication.class, args); 18 | } 19 | 20 | @Autowired 21 | private FunctionCatalog functionCatalog; 22 | 23 | private Runnable composedFunction; 24 | 25 | @PostConstruct 26 | void init() { 27 | this.composedFunction = this.functionCatalog.lookup(null); 28 | } 29 | 30 | @Scheduled(fixedDelay = 1000) 31 | void scheduleFunctionCall() { 32 | this.composedFunction.run(); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /samples/time-spel-log/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | cloud: 3 | function: 4 | definition: timeSupplier|spelFunction|logConsumer 5 | 6 | time: 7 | date-format: ss 8 | 9 | spel: 10 | function: 11 | expression: "'Current seconds: ' + payload" -------------------------------------------------------------------------------- /samples/time-spel-log/src/test/java/com/example/TimeSpelLogApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.junit.jupiter.api.extension.ExtendWith; 5 | 6 | import org.springframework.boot.test.context.SpringBootTest; 7 | import org.springframework.boot.test.system.CapturedOutput; 8 | import org.springframework.boot.test.system.OutputCaptureExtension; 9 | import org.springframework.test.annotation.DirtiesContext; 10 | 11 | import static org.assertj.core.api.Assertions.assertThat; 12 | import static org.awaitility.Awaitility.await; 13 | 14 | @SpringBootTest 15 | @ExtendWith(OutputCaptureExtension.class) 16 | @DirtiesContext 17 | class TimeSpelLogApplicationTests { 18 | 19 | @Test 20 | void theTimeIsEmittedThroughSpelToLog(CapturedOutput output) { 21 | await().untilAsserted(() -> assertThat(output.getOut()).contains("Current seconds: ")); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /samples/zip-split-rabbit-binder/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'java' 3 | id 'org.springframework.boot' version '3.4.6' 4 | id 'io.spring.dependency-management' version '1.1.7' 5 | } 6 | 7 | group = 'com.example' 8 | version = '0.0.1-SNAPSHOT' 9 | 10 | java { 11 | toolchain { 12 | languageVersion = JavaLanguageVersion.of(17) 13 | } 14 | } 15 | 16 | repositories { 17 | mavenCentral() 18 | maven { url 'https://repo.spring.io/snapshot' } 19 | } 20 | 21 | ext { 22 | springCloudVersion = '2024.0.1' 23 | springFunctionsCatalogVersion = '5.1.0' 24 | } 25 | 26 | dependencyManagement { 27 | imports { 28 | mavenBom "org.springframework.cloud:spring-cloud-dependencies:$springCloudVersion" 29 | mavenBom "org.springframework.cloud.fn:spring-functions-catalog-bom:$springFunctionsCatalogVersion" 30 | } 31 | } 32 | 33 | dependencies { 34 | implementation 'org.springframework.cloud:spring-cloud-stream-binder-rabbit' 35 | implementation 'org.springframework.integration:spring-integration-zip' 36 | implementation 'org.springframework.cloud.fn:spring-file-supplier' 37 | implementation 'org.springframework.cloud.fn:spring-splitter-function' 38 | 39 | testImplementation 'org.springframework.boot:spring-boot-starter-test' 40 | testImplementation 'org.springframework.boot:spring-boot-testcontainers' 41 | testImplementation 'org.testcontainers:junit-jupiter' 42 | testImplementation 'org.testcontainers:rabbitmq' 43 | 44 | testRuntimeOnly 'org.junit.platform:junit-platform-launcher' 45 | } 46 | 47 | tasks.named('test') { 48 | useJUnitPlatform() 49 | } 50 | -------------------------------------------------------------------------------- /samples/zip-split-rabbit-binder/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-cloud/spring-functions-catalog/9a42b71aef92b6135a527385e4361d31e7318c23/samples/zip-split-rabbit-binder/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /samples/zip-split-rabbit-binder/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /samples/zip-split-rabbit-binder/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'zip-split-rabbit-binder' 2 | -------------------------------------------------------------------------------- /samples/zip-split-rabbit-binder/src/main/java/com/example/ZipSplitRabbitBinderApplication.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import java.io.File; 4 | import java.util.Map; 5 | import java.util.function.Function; 6 | 7 | import reactor.core.publisher.Flux; 8 | 9 | import org.springframework.boot.SpringApplication; 10 | import org.springframework.boot.autoconfigure.SpringBootApplication; 11 | import org.springframework.context.annotation.Bean; 12 | import org.springframework.integration.zip.transformer.UnZipTransformer; 13 | import org.springframework.messaging.Message; 14 | 15 | @SpringBootApplication 16 | public class ZipSplitRabbitBinderApplication { 17 | 18 | public static void main(String[] args) { 19 | SpringApplication.run(ZipSplitRabbitBinderApplication.class, args); 20 | } 21 | 22 | @Bean 23 | UnZipTransformer unZipTransformer() { 24 | return new UnZipTransformer(); 25 | } 26 | 27 | @Bean 28 | @SuppressWarnings("unchecked") 29 | Function>, Flux> unzipFunction(UnZipTransformer unZipTransformer) { 30 | return messageFlux -> messageFlux.map(unZipTransformer::transform) 31 | .map(Message::getPayload) 32 | .map(map -> (Map) map) // The result of UnZipTransformer 33 | .flatMapIterable(Map::values); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /samples/zip-split-rabbit-binder/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | application: 3 | name: zip-split-rabbit-binder 4 | 5 | cloud: 6 | function: 7 | definition: fileSupplier|unzipFunction|splitterFunction 8 | 9 | stream: 10 | bindings: 11 | fileSupplier|unzipFunction|splitterFunction-out-0: 12 | destination: unzipped_data_exchange 13 | 14 | file: 15 | supplier: 16 | directory: # Set some real dir with zips to process 17 | filename-pattern: '*.zip' 18 | 19 | splitter: 20 | charset: UTF-8 21 | -------------------------------------------------------------------------------- /samples/zip-split-rabbit-binder/src/test/resources/dirWithZips/zip1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-cloud/spring-functions-catalog/9a42b71aef92b6135a527385e4361d31e7318c23/samples/zip-split-rabbit-binder/src/test/resources/dirWithZips/zip1.zip -------------------------------------------------------------------------------- /samples/zip-split-rabbit-binder/src/test/resources/dirWithZips/zip2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-cloud/spring-functions-catalog/9a42b71aef92b6135a527385e4361d31e7318c23/samples/zip-split-rabbit-binder/src/test/resources/dirWithZips/zip2.zip -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | mavenCentral() 5 | } 6 | } 7 | 8 | plugins { 9 | id 'io.spring.develocity.conventions' version '0.0.22' apply false 10 | } 11 | 12 | startParameter.noBuildScan = startParameter.taskNames.contains('format') 13 | 14 | apply plugin: 'io.spring.develocity.conventions' 15 | 16 | rootProject.name = 'spring-functions-catalog' 17 | 18 | include 'spring-functions-catalog-bom' 19 | 20 | ['common', 'consumer', 'function', 'supplier'].each { group -> 21 | def groupDir = file(group) 22 | groupDir.eachDir { subProject -> 23 | include "${subProject.name}" 24 | project(":${subProject.name}").projectDir = new File(groupDir.absolutePath, subProject.name) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /spring-functions-catalog-bom/build.gradle: -------------------------------------------------------------------------------- 1 | description = 'Spring Functions Catalog (Bill of Materials)' 2 | 3 | apply plugin: 'java-platform' 4 | apply from: "${rootDir}/publish-maven.gradle" 5 | 6 | dependencies { 7 | constraints { 8 | javaProjects.sort { "$it.name" }.each { 9 | api it 10 | } 11 | } 12 | } 13 | 14 | publishing { 15 | publications { 16 | mavenJava(MavenPublication) { 17 | from components.javaPlatform 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /supplier/spring-debezium-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-debezium-autoconfigure') 3 | 4 | api 'io.debezium:debezium-connector-mysql' 5 | api 'io.debezium:debezium-connector-mongodb' 6 | api 'io.debezium:debezium-connector-postgres' 7 | api 'io.debezium:debezium-connector-oracle' 8 | api 'io.debezium:debezium-connector-sqlserver' 9 | api 'io.debezium:debezium-connector-db2' 10 | api 'io.debezium:debezium-connector-vitess' 11 | api 'io.debezium:debezium-connector-spanner' 12 | 13 | testImplementation 'com.zaxxer:HikariCP' 14 | testImplementation 'org.springframework:spring-jdbc' 15 | } 16 | -------------------------------------------------------------------------------- /supplier/spring-debezium-supplier/src/main/java/org/springframework/cloud/fn/supplier/debezium/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Debezium supplier support classes. 3 | */ 4 | package org.springframework.cloud.fn.supplier.debezium; 5 | -------------------------------------------------------------------------------- /supplier/spring-debezium-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.debezium.DebeziumReactiveConsumerConfiguration 2 | -------------------------------------------------------------------------------- /supplier/spring-debezium-supplier/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /supplier/spring-file-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-file-common') 3 | api project(':spring-metadata-store-common') 4 | 5 | testImplementation 'org.springframework.integration:spring-integration-jdbc' 6 | testImplementation 'org.springframework.boot:spring-boot-starter-jdbc' 7 | testImplementation 'org.hsqldb:hsqldb' 8 | } 9 | -------------------------------------------------------------------------------- /supplier/spring-file-supplier/src/main/java/org/springframework/cloud/fn/supplier/file/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The file supplier auto-configuration. 3 | */ 4 | package org.springframework.cloud.fn.supplier.file; 5 | -------------------------------------------------------------------------------- /supplier/spring-file-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.file.FileSupplierConfiguration 2 | -------------------------------------------------------------------------------- /supplier/spring-ftp-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-ftp-common') 3 | api project(':spring-file-common') 4 | api project(':spring-metadata-store-common') 5 | 6 | testImplementation project(':spring-function-test-support') 7 | testImplementation ftpServerCore 8 | } 9 | -------------------------------------------------------------------------------- /supplier/spring-ftp-supplier/src/main/java/org/springframework/cloud/fn/supplier/ftp/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The FTP supplier auto-configuration. 3 | */ 4 | package org.springframework.cloud.fn.supplier.ftp; 5 | -------------------------------------------------------------------------------- /supplier/spring-ftp-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.ftp.FtpSupplierConfiguration 2 | -------------------------------------------------------------------------------- /supplier/spring-http-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.boot:spring-boot-starter-webflux' 3 | api 'org.springframework.integration:spring-integration-webflux' 4 | } 5 | -------------------------------------------------------------------------------- /supplier/spring-http-supplier/src/main/java/org/springframework/cloud/fn/supplier/http/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The HTTP supplier auto-configuration. 3 | */ 4 | package org.springframework.cloud.fn.supplier.http; 5 | -------------------------------------------------------------------------------- /supplier/spring-http-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.http.HttpSupplierConfiguration 2 | -------------------------------------------------------------------------------- /supplier/spring-http-supplier/src/test/resources/test.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-cloud/spring-functions-catalog/9a42b71aef92b6135a527385e4361d31e7318c23/supplier/spring-http-supplier/src/test/resources/test.jks -------------------------------------------------------------------------------- /supplier/spring-jdbc-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-splitter-function') 3 | api 'org.springframework.integration:spring-integration-jdbc' 4 | api 'org.springframework.boot:spring-boot-starter-jdbc' 5 | 6 | runtimeOnly 'org.hsqldb:hsqldb' 7 | runtimeOnly 'com.h2database:h2' 8 | runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' 9 | runtimeOnly 'org.postgresql:postgresql' 10 | runtimeOnly 'com.microsoft.sqlserver:mssql-jdbc' 11 | } 12 | -------------------------------------------------------------------------------- /supplier/spring-jdbc-supplier/src/main/java/org/springframework/cloud/fn/supplier/jdbc/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The JDBC supplier auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.supplier.jdbc; 5 | -------------------------------------------------------------------------------- /supplier/spring-jdbc-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.jdbc.JdbcSupplierConfiguration 2 | -------------------------------------------------------------------------------- /supplier/spring-jdbc-supplier/src/test/resources/schema.sql: -------------------------------------------------------------------------------- 1 | -- Run by default by Boot infrastructure 2 | 3 | create table test( 4 | id bigint, 5 | name varchar (2000), 6 | tag char(1) 7 | ); 8 | insert into test values (1, 'Bob', NULL); 9 | insert into test values (2, 'Jane', NULL); 10 | insert into test values (3, 'John', NULL); -------------------------------------------------------------------------------- /supplier/spring-jms-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-jms' 3 | api 'jakarta.jms:jakarta.jms-api' 4 | 5 | testImplementation 'org.springframework.boot:spring-boot-starter-artemis' 6 | testImplementation 'org.apache.activemq:artemis-jakarta-server' 7 | } 8 | -------------------------------------------------------------------------------- /supplier/spring-jms-supplier/src/main/java/org/springframework/cloud/fn/supplier/jms/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The JMS supplier auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.supplier.jms; 5 | -------------------------------------------------------------------------------- /supplier/spring-jms-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.jms.JmsSupplierConfiguration 2 | -------------------------------------------------------------------------------- /supplier/spring-jms-supplier/src/test/java/org/springframework/cloud/fn/supplier/jms/AbstractJmsSupplierTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.supplier.jms; 18 | 19 | import org.springframework.beans.factory.annotation.Autowired; 20 | import org.springframework.boot.autoconfigure.SpringBootApplication; 21 | import org.springframework.boot.test.context.SpringBootTest; 22 | import org.springframework.integration.jms.JmsMessageDrivenEndpoint; 23 | import org.springframework.test.annotation.DirtiesContext; 24 | 25 | @SpringBootTest 26 | @DirtiesContext 27 | public class AbstractJmsSupplierTests { 28 | 29 | @Autowired 30 | protected JmsMessageDrivenEndpoint endpoint; 31 | 32 | @SpringBootApplication 33 | public static class JmsSupplierTestApplication { 34 | 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /supplier/spring-kafka-supplier/README.adoc: -------------------------------------------------------------------------------- 1 | = Apache Kafka (Consumer) Supplier 2 | 3 | A `Supplier` that allows to consume messages from Apache Kafka topic. 4 | 5 | 6 | == Beans for injection 7 | 8 | The `KafkaSupplierConfiguration` is an auto-configuration, so no need to import anything. 9 | 10 | The `Supplier>> kafkaSupplier` bean can be injected into the target service for consuming data from Kafka topics. 11 | 12 | == Configuration Options 13 | 14 | All configuration properties are prefixed with `kafka.supplier`. 15 | 16 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/supplier/kafka/KafkaSupplierProperties.java[KafkaSupplierProperties]. 17 | Also, this artifact fully depends on Spring for Apache Kafka auto-configuration and injects a `ConcurrentKafkaListenerContainerFactory` from there. 18 | 19 | A `ComponentCustomizer>` bean can be added in the target project to provide any custom options for the `KafkaMessageDrivenChannelAdapterSpec` configuration used by the `kafkaSupplier`. 20 | 21 | See more information about `KafkaMessageDrivenChannelAdapter` configuration and behavior in Spring Integration https://docs.spring.io/spring-integration/docs/current/reference/html/kafka.html=kafka-inbound[documentation]. 22 | 23 | == Other usage 24 | 25 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/kafka-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes an Apache Kafka source. 26 | -------------------------------------------------------------------------------- /supplier/spring-kafka-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-kafka' 3 | 4 | testImplementation 'org.springframework.kafka:spring-kafka-test' 5 | } 6 | -------------------------------------------------------------------------------- /supplier/spring-kafka-supplier/src/main/java/org/springframework/cloud/fn/supplier/kafka/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Apache Kafka supplier auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.supplier.kafka; 5 | -------------------------------------------------------------------------------- /supplier/spring-kafka-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.kafka.KafkaSupplierConfiguration 2 | -------------------------------------------------------------------------------- /supplier/spring-mail-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-mail' 3 | api 'org.springframework.boot:spring-boot-starter-mail' 4 | 5 | testImplementation 'com.icegreen:greenmail:2.1.3' 6 | } 7 | -------------------------------------------------------------------------------- /supplier/spring-mail-supplier/src/main/java/org/springframework/cloud/fn/supplier/mail/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The MQTT supplier auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.supplier.mail; 5 | -------------------------------------------------------------------------------- /supplier/spring-mail-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.mail.MailSupplierConfiguration 2 | -------------------------------------------------------------------------------- /supplier/spring-mail-supplier/src/test/java/org/springframework/cloud/fn/supplier/mail/Pop3PassTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.supplier.mail; 18 | 19 | import org.junit.jupiter.api.Test; 20 | import reactor.core.publisher.Flux; 21 | import reactor.test.StepVerifier; 22 | 23 | import org.springframework.messaging.Message; 24 | import org.springframework.test.context.TestPropertySource; 25 | 26 | import static org.assertj.core.api.Assertions.assertThat; 27 | 28 | @TestPropertySource(properties = "mail.supplier.url=pop3://user:pw@localhost:${test.mail.server.pop3.port}/INBOX") 29 | public class Pop3PassTests extends AbstractMailSupplierTests { 30 | 31 | @Test 32 | public void testSimpleTest() { 33 | // given 34 | sendMessage("test", "foo"); 35 | final Flux> messageFlux = mailSupplier.get(); 36 | 37 | StepVerifier.create(messageFlux) 38 | .assertNext((message) -> assertThat(((String) message.getPayload())).contains("foo")) 39 | .thenCancel() 40 | .verify(); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /supplier/spring-mongodb-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-splitter-function') 3 | api 'org.springframework.integration:spring-integration-mongodb' 4 | api 'org.mongodb:mongodb-driver-sync' 5 | 6 | testImplementation 'org.testcontainers:mongodb' 7 | testImplementation project(':spring-mongodb-consumer').sourceSets.test.output 8 | } 9 | -------------------------------------------------------------------------------- /supplier/spring-mongodb-supplier/src/main/java/org/springframework/cloud/fn/supplier/mongo/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The MongoDB supplier auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.supplier.mongo; 5 | -------------------------------------------------------------------------------- /supplier/spring-mongodb-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.mongo.MongodbSupplierConfiguration 2 | -------------------------------------------------------------------------------- /supplier/spring-mqtt-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-mqtt-common') 3 | 4 | testImplementation project(':spring-function-test-support') 5 | } 6 | -------------------------------------------------------------------------------- /supplier/spring-mqtt-supplier/src/main/java/org/springframework/cloud/fn/supplier/mqtt/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The MQTT supplier auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.supplier.mqtt; 5 | -------------------------------------------------------------------------------- /supplier/spring-mqtt-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.mqtt.MqttSupplierConfiguration 2 | -------------------------------------------------------------------------------- /supplier/spring-mqtt-supplier/src/test/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /supplier/spring-rabbit-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-amqp' 3 | api 'org.springframework.boot:spring-boot-starter-amqp' 4 | 5 | testImplementation 'org.testcontainers:rabbitmq' 6 | testImplementation project(':spring-rabbit-consumer').sourceSets.test.output 7 | } 8 | -------------------------------------------------------------------------------- /supplier/spring-rabbit-supplier/src/main/java/org/springframework/cloud/fn/supplier/rabbit/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The RabbitMQ supplier auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.supplier.rabbit; 5 | -------------------------------------------------------------------------------- /supplier/spring-rabbit-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.rabbit.RabbitSupplierConfiguration 2 | -------------------------------------------------------------------------------- /supplier/spring-s3-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-aws-s3-common') 3 | api project(':spring-file-common') 4 | api project(':spring-metadata-store-common') 5 | } 6 | -------------------------------------------------------------------------------- /supplier/spring-s3-supplier/src/main/java/org/springframework/cloud/fn/supplier/s3/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The S3 supplier auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.supplier.s3; 5 | -------------------------------------------------------------------------------- /supplier/spring-s3-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.s3.AwsS3SupplierConfiguration 2 | -------------------------------------------------------------------------------- /supplier/spring-sftp-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-sftp' 3 | api project(':spring-file-common') 4 | api project(':spring-metadata-store-common') 5 | 6 | testImplementation project(':spring-function-test-support') 7 | } 8 | -------------------------------------------------------------------------------- /supplier/spring-sftp-supplier/src/main/java/org/springframework/cloud/fn/supplier/sftp/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The SFTP supplier auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.supplier.sftp; 5 | -------------------------------------------------------------------------------- /supplier/spring-sftp-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.sftp.SftpSupplierConfiguration 2 | -------------------------------------------------------------------------------- /supplier/spring-sftp-supplier/src/test/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /supplier/spring-syslog-supplier/README.adoc: -------------------------------------------------------------------------------- 1 | = Syslog Supplier 2 | 3 | Syslog supplier that produces both TCP and UDP based syslog events. 4 | The `Supplier` uses the `TcpSyslogReceivingChannelAdapter` and `UdpSyslogReceivingChannelAdapter` from Spring Integration. 5 | This supplier gives you a reactive stream of messages and the supplier has a signature of `Supplier>>`. 6 | Users have to subscribe to this `Flux` and receive the data. 7 | 8 | == Beans for injection 9 | 10 | The `SyslogSupplierConfiguration` provides the following bean: 11 | 12 | `syslogSupplier` 13 | 14 | You need to inject this as `Supplier>>`. 15 | 16 | You can use `syslogSupplier` as a qualifier when injecting. 17 | 18 | Once injected, you can use the `get` method of the `Supplier` to invoke it and then subscribe to the returned `Flux`. 19 | 20 | == Configuration Options 21 | 22 | All configuration properties are prefixed with `syslog.supplier`. 23 | 24 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/supplier/syslog/SyslogSupplierProperties.java[SyslogSupplierProperties]. 25 | 26 | == Tests 27 | 28 | See this link:src/test/java/org/springframework/cloud/fn/supplier/syslog[test suite] for the various ways, this supplier is used. 29 | 30 | == Other usage 31 | 32 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/syslog-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes a Syslog Source. -------------------------------------------------------------------------------- /supplier/spring-syslog-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-syslog' 3 | } 4 | -------------------------------------------------------------------------------- /supplier/spring-syslog-supplier/src/main/java/org/springframework/cloud/fn/supplier/syslog/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Syslog supplier auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.supplier.syslog; 5 | -------------------------------------------------------------------------------- /supplier/spring-syslog-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.syslog.SyslogSupplierConfiguration 2 | -------------------------------------------------------------------------------- /supplier/spring-syslog-supplier/src/test/java/org/springframework/cloud/fn/supplier/syslog/NotNioTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.supplier.syslog; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.integration.ip.tcp.connection.TcpNetServerConnectionFactory; 22 | import org.springframework.integration.test.util.TestUtils; 23 | 24 | import static org.assertj.core.api.Assertions.assertThat; 25 | 26 | public class NotNioTests extends AbstractSyslogSupplierTests { 27 | 28 | @Test 29 | public void test() throws Exception { 30 | assertThat(this.connectionFactory).isInstanceOf(TcpNetServerConnectionFactory.class); 31 | assertThat(TestUtils.getPropertyValue(this.connectionFactory, "lookupHost", Boolean.class)).isFalse(); 32 | assertThat(TestUtils.getPropertyValue(this.connectionFactory, "soTimeout")).isEqualTo(0); 33 | assertThat(TestUtils.getPropertyValue(this.connectionFactory, "deserializer.maxMessageSize")).isEqualTo(2048); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /supplier/spring-syslog-supplier/src/test/java/org/springframework/cloud/fn/supplier/syslog/Tcp3164Tests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.supplier.syslog; 18 | 19 | import java.util.Map; 20 | 21 | import org.junit.jupiter.api.Test; 22 | import reactor.core.publisher.Flux; 23 | import reactor.test.StepVerifier; 24 | 25 | import org.springframework.messaging.Message; 26 | 27 | import static org.assertj.core.api.Assertions.assertThat; 28 | 29 | public class Tcp3164Tests extends AbstractSyslogSupplierTests { 30 | 31 | @Test 32 | public void test() throws Exception { 33 | final Flux> messageFlux = syslogSupplier.get(); 34 | 35 | final StepVerifier stepVerifier = StepVerifier.create(messageFlux) 36 | .assertNext((message) -> assertThat(((Map) message.getPayload()).get("HOST")).isEqualTo("WEBERN")) 37 | .thenCancel() 38 | .verifyLater(); 39 | 40 | sendTcp(AbstractSyslogSupplierTests.RFC3164_PACKET + "\n"); 41 | 42 | stepVerifier.verify(); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /supplier/spring-tcp-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-tcp-common') 3 | } 4 | -------------------------------------------------------------------------------- /supplier/spring-tcp-supplier/src/main/java/org/springframework/cloud/fn/supplier/tcp/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The TCP supplier auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.supplier.tcp; 5 | -------------------------------------------------------------------------------- /supplier/spring-tcp-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.tcp.TcpSupplierConfiguration 2 | -------------------------------------------------------------------------------- /supplier/spring-tcp-supplier/src/test/java/org/springframework/cloud/fn/supplier/tcp/CRLFTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.supplier.tcp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | /** 22 | * @author Gary Russell 23 | */ 24 | public class CRLFTests extends AbstractTcpSupplierTests { 25 | 26 | @Test 27 | public void test() throws Exception { 28 | doTest("", "foo", "\r\n"); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /supplier/spring-tcp-supplier/src/test/java/org/springframework/cloud/fn/supplier/tcp/L1Tests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.supplier.tcp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.test.context.TestPropertySource; 22 | 23 | /** 24 | * @author Gary Russell 25 | */ 26 | @TestPropertySource(properties = { "tcp.supplier.decoder = L1" }) 27 | public class L1Tests extends AbstractTcpSupplierTests { 28 | 29 | @Test 30 | public void test() throws Exception { 31 | doTest("\u0003", "foo", ""); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /supplier/spring-tcp-supplier/src/test/java/org/springframework/cloud/fn/supplier/tcp/L2Tests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.supplier.tcp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.test.context.TestPropertySource; 22 | 23 | /** 24 | * @author Gary Russell 25 | */ 26 | @TestPropertySource(properties = { "tcp.supplier.decoder = L2" }) 27 | public class L2Tests extends AbstractTcpSupplierTests { 28 | 29 | @Test 30 | public void test() throws Exception { 31 | doTest("\u0000\u0003", "foo", ""); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /supplier/spring-tcp-supplier/src/test/java/org/springframework/cloud/fn/supplier/tcp/L4Tests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.supplier.tcp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.test.context.TestPropertySource; 22 | 23 | /** 24 | * @author Gary Russell 25 | */ 26 | @TestPropertySource(properties = { "tcp.supplier.decoder = L4" }) 27 | public class L4Tests extends AbstractTcpSupplierTests { 28 | 29 | @Test 30 | public void test() throws Exception { 31 | doTest("\u0000\u0000\u0000\u0003", "foo", ""); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /supplier/spring-tcp-supplier/src/test/java/org/springframework/cloud/fn/supplier/tcp/LFTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.supplier.tcp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.test.context.TestPropertySource; 22 | 23 | /** 24 | * @author Gary Russell 25 | */ 26 | @TestPropertySource(properties = { "tcp.supplier.decoder = LF" }) 27 | public class LFTests extends AbstractTcpSupplierTests { 28 | 29 | @Test 30 | public void test() throws Exception { 31 | doTest("", "foo", "\n"); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /supplier/spring-tcp-supplier/src/test/java/org/springframework/cloud/fn/supplier/tcp/NULLTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.supplier.tcp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.test.context.TestPropertySource; 22 | 23 | /** 24 | * @author Gary Russell 25 | */ 26 | @TestPropertySource(properties = { "tcp.supplier.decoder = NULL" }) 27 | public class NULLTests extends AbstractTcpSupplierTests { 28 | 29 | @Test 30 | public void test() throws Exception { 31 | doTest("", "foo", "\u0000"); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /supplier/spring-tcp-supplier/src/test/java/org/springframework/cloud/fn/supplier/tcp/NotNioTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.supplier.tcp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.integration.ip.tcp.connection.TcpNetServerConnectionFactory; 22 | import org.springframework.integration.test.util.TestUtils; 23 | 24 | import static org.assertj.core.api.Assertions.assertThat; 25 | 26 | /** 27 | * @author Gary Russell 28 | */ 29 | public class NotNioTests extends AbstractTcpSupplierTests { 30 | 31 | @Test 32 | public void test() { 33 | assertThat(this.connectionFactory).isInstanceOf(TcpNetServerConnectionFactory.class); 34 | assertThat(TestUtils.getPropertyValue(this.connectionFactory, "lookupHost", Boolean.class)).isFalse(); 35 | assertThat(TestUtils.getPropertyValue(this.connectionFactory, "soTimeout")).isEqualTo(120000); 36 | assertThat(TestUtils.getPropertyValue(this.connectionFactory, "deserializer.maxMessageSize")).isEqualTo(2048); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /supplier/spring-tcp-supplier/src/test/java/org/springframework/cloud/fn/supplier/tcp/RAWTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.supplier.tcp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.test.context.TestPropertySource; 22 | 23 | /** 24 | * @author Gary Russell 25 | */ 26 | @TestPropertySource(properties = { "tcp.supplier.decoder = RAW" }) 27 | public class RAWTests extends AbstractTcpSupplierTests { 28 | 29 | @Test 30 | public void test() throws Exception { 31 | doTest("", "foo", ""); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /supplier/spring-tcp-supplier/src/test/java/org/springframework/cloud/fn/supplier/tcp/STXETXTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.supplier.tcp; 18 | 19 | import org.junit.jupiter.api.Test; 20 | 21 | import org.springframework.test.context.TestPropertySource; 22 | 23 | /** 24 | * @author Gary Russell 25 | */ 26 | @TestPropertySource(properties = { "tcp.supplier.decoder = STXETX" }) 27 | public class STXETXTests extends AbstractTcpSupplierTests { 28 | 29 | @Test 30 | public void test() throws Exception { 31 | doTest("\u0002", "foo", "\u0003"); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /supplier/spring-time-supplier/README.adoc: -------------------------------------------------------------------------------- 1 | = Time Supplier 2 | 3 | This module provides a Time supplier that can be reused and composed in other applications. 4 | The `Supplier` uses the `FastDateFormat` from Apache Commons library. 5 | `timeSupplier` is implemented as a `java.util.function.Supplier`. 6 | 7 | == Beans for injection 8 | 9 | The `TimeSupplierConfiguration` auto-configuration provides the following bean: 10 | 11 | `timeSupplier` 12 | 13 | You need to inject this as `Supplier`. 14 | 15 | You can use `timeSupplier` as a qualifier when injecting. 16 | 17 | Once injected, you can use the `get` method of the `Supplier` to invoke it. 18 | 19 | == Configuration Options 20 | 21 | All configuration properties are prefixed with `time`. 22 | 23 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/supplier/time/TimeSupplierProperties.java[TimeSupplierProperties]. 24 | 25 | == Tests 26 | 27 | See this link:src/test/java/org/springframework/cloud/fn/supplier/time[test suite] for the various ways, this supplier is used. 28 | 29 | == Other usage 30 | 31 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/time-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes an Time Source. -------------------------------------------------------------------------------- /supplier/spring-time-supplier/src/main/java/org/springframework/cloud/fn/supplier/time/TimeSupplierConfiguration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.supplier.time; 18 | 19 | import java.time.LocalDateTime; 20 | import java.time.format.DateTimeFormatter; 21 | import java.util.function.Supplier; 22 | 23 | import org.springframework.boot.autoconfigure.AutoConfiguration; 24 | import org.springframework.boot.context.properties.EnableConfigurationProperties; 25 | import org.springframework.context.annotation.Bean; 26 | 27 | /** 28 | * Auto-configuration for time supplier. 29 | * 30 | * @author Soby Chacko 31 | * @author Artem Bilan 32 | */ 33 | @AutoConfiguration 34 | @EnableConfigurationProperties(TimeSupplierProperties.class) 35 | public class TimeSupplierConfiguration { 36 | 37 | @Bean 38 | public Supplier timeSupplier(TimeSupplierProperties timeSupplierProperties) { 39 | DateTimeFormatter fastDateFormat = DateTimeFormatter.ofPattern(timeSupplierProperties.getDateFormat()); 40 | return () -> fastDateFormat.format(LocalDateTime.now()); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /supplier/spring-time-supplier/src/main/java/org/springframework/cloud/fn/supplier/time/TimeSupplierProperties.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.supplier.time; 18 | 19 | import org.springframework.boot.context.properties.ConfigurationProperties; 20 | import org.springframework.validation.annotation.Validated; 21 | 22 | /** 23 | * The time supplier properties. 24 | * 25 | * @author Soby Chacko 26 | */ 27 | @ConfigurationProperties("time") 28 | @Validated 29 | public class TimeSupplierProperties { 30 | 31 | /** 32 | * Format for the date value. 33 | */ 34 | private String dateFormat = "MM/dd/yy HH:mm:ss"; 35 | 36 | @DateFormat 37 | public String getDateFormat() { 38 | return this.dateFormat; 39 | } 40 | 41 | public void setDateFormat(String dateFormat) { 42 | this.dateFormat = dateFormat; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /supplier/spring-time-supplier/src/main/java/org/springframework/cloud/fn/supplier/time/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The time supplier auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.supplier.time; 5 | -------------------------------------------------------------------------------- /supplier/spring-time-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.time.TimeSupplierConfiguration 2 | -------------------------------------------------------------------------------- /supplier/spring-time-supplier/src/test/java/org/springframework/cloud/fn/supplier/time/SimpleTimeSupplierTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.supplier.time; 18 | 19 | import java.text.SimpleDateFormat; 20 | 21 | import org.junit.jupiter.api.Test; 22 | 23 | import static org.assertj.core.api.Assertions.assertThat; 24 | import static org.assertj.core.api.Assertions.assertThatNoException; 25 | 26 | /** 27 | * @author Soby Chacko 28 | * @author Artem Bilan 29 | */ 30 | public class SimpleTimeSupplierTests extends TimeSupplierApplicationTests { 31 | 32 | @Test 33 | public void testTimeSupplier() { 34 | final String time = timeSupplier.get(); 35 | SimpleDateFormat dateFormat = new SimpleDateFormat(new TimeSupplierProperties().getDateFormat()); 36 | assertThatNoException().isThrownBy(() -> assertThat(dateFormat.parse(time)).isNotNull()); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /supplier/spring-time-supplier/src/test/java/org/springframework/cloud/fn/supplier/time/TimeSupplierApplicationTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2020 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.cloud.fn.supplier.time; 18 | 19 | import java.util.function.Supplier; 20 | 21 | import org.springframework.beans.factory.annotation.Autowired; 22 | import org.springframework.boot.autoconfigure.SpringBootApplication; 23 | import org.springframework.boot.test.context.SpringBootTest; 24 | 25 | /** 26 | * @author Soby Chacko 27 | * @author Artem Bilan 28 | */ 29 | @SpringBootTest 30 | public abstract class TimeSupplierApplicationTests { 31 | 32 | @Autowired 33 | Supplier timeSupplier; 34 | 35 | @Autowired 36 | TimeSupplierProperties timeSupplierProperties; 37 | 38 | protected abstract void testTimeSupplier(); 39 | 40 | @SpringBootApplication 41 | static class TimeSupplierTestApplication { 42 | 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /supplier/spring-twitter-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-twitter-common') 3 | 4 | testImplementation mockServerNetty 5 | } 6 | -------------------------------------------------------------------------------- /supplier/spring-twitter-supplier/src/main/java/org/springframework/cloud/fn/supplier/twitter/friendships/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Twitter friendships updates supplier support classes. 3 | */ 4 | package org.springframework.cloud.fn.supplier.twitter.friendships; 5 | -------------------------------------------------------------------------------- /supplier/spring-twitter-supplier/src/main/java/org/springframework/cloud/fn/supplier/twitter/message/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Twitter message supplier support classes. 3 | */ 4 | package org.springframework.cloud.fn.supplier.twitter.message; 5 | -------------------------------------------------------------------------------- /supplier/spring-twitter-supplier/src/main/java/org/springframework/cloud/fn/supplier/twitter/status/search/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Twitter search supplier support classes. 3 | */ 4 | package org.springframework.cloud.fn.supplier.twitter.status.search; 5 | -------------------------------------------------------------------------------- /supplier/spring-twitter-supplier/src/main/java/org/springframework/cloud/fn/supplier/twitter/status/stream/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The Twitter streaming supplier support classes. 3 | */ 4 | package org.springframework.cloud.fn.supplier.twitter.status.stream; 5 | -------------------------------------------------------------------------------- /supplier/spring-twitter-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.twitter.friendships.TwitterFriendshipsSupplierConfiguration 2 | org.springframework.cloud.fn.supplier.twitter.message.TwitterMessageSupplierConfiguration 3 | org.springframework.cloud.fn.supplier.twitter.status.search.TwitterSearchSupplierConfiguration 4 | org.springframework.cloud.fn.supplier.twitter.status.stream.TwitterStreamSupplierConfiguration 5 | -------------------------------------------------------------------------------- /supplier/spring-twitter-supplier/src/test/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /supplier/spring-websocket-supplier/README.adoc: -------------------------------------------------------------------------------- 1 | = Websocket Supplier 2 | 3 | A basic websocket supplier that produced messages through web socket. 4 | The `Supplier` uses the `WebsocketInboundChannelAdapter` from Spring Integration. 5 | This supplier gives you a reactive stream of messages and the supplier has a signature of `Supplier>>`. 6 | Users have to subscribe to this `Flux` and receive the data. 7 | 8 | == Beans for injection 9 | 10 | The `WebsocketSupplierConfiguration` auto-configuration provides the following bean: 11 | 12 | `websocketSupplier` 13 | 14 | You need to inject this as `Supplier>>`. 15 | 16 | You can use `websocketSupplier` as a qualifier when injecting. 17 | 18 | Once injected, you can use the `get` method of the `Supplier` to invoke it and then subscribe to the returned `Flux`. 19 | 20 | == Configuration Options 21 | 22 | All configuration properties are prefixed with `websocket.supplier`. 23 | 24 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/supplier/websocket/WebsocketSupplierProperties.java[WebsocketSupplierProperties]. 25 | 26 | == Tests 27 | 28 | See this link:src/test/java/org/springframework/cloud/fn/supplier/websocket/WebsocketSupplierTests.java[test suite] for the various ways, this supplier is used. 29 | 30 | == Other usage 31 | 32 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/websocket-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes a File Source. -------------------------------------------------------------------------------- /supplier/spring-websocket-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-websocket' 3 | api 'org.springframework.boot:spring-boot-starter-web' 4 | 5 | testImplementation 'org.springframework.boot:spring-boot-starter-security' 6 | testImplementation project(':spring-function-test-support') 7 | } 8 | -------------------------------------------------------------------------------- /supplier/spring-websocket-supplier/src/main/java/org/springframework/cloud/fn/supplier/websocket/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The WebSocket supplier auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.supplier.websocket; 5 | -------------------------------------------------------------------------------- /supplier/spring-websocket-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.websocket.WebsocketSupplierConfiguration -------------------------------------------------------------------------------- /supplier/spring-xmpp-supplier/README.adoc: -------------------------------------------------------------------------------- 1 | = XMPP Supplier 2 | 3 | A supplier that allows you to receive messages through a XMPP server. 4 | 5 | == Beans for injection 6 | 7 | You can import the `XmppSupplierConfiguration` in the application and then inject the following bean. 8 | 9 | `Supplier xmppSupplier` 10 | 11 | You need to inject this as `Supplier xmppSupplier`. 12 | 13 | You can use `xmppSupplier` as a qualifier when injecting. 14 | 15 | **NOTE:** This is a functional endpoint. One will need to subscribe to this endpoint in order to start accepting data 16 | on it. 17 | 18 | == Configuration Options 19 | 20 | All configuration properties are prefixed with `xmpp.supplier`. 21 | 22 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/supplier/xmpp/XmppSupplierProperties.java[XmppSupplierProperties]. 23 | 24 | == Tests 25 | 26 | See this link:src/test/java/org/springframework/cloud/fn/supplier/xmpp/[test suite] for the various ways, this supplier is used. 27 | 28 | == Other usage 29 | 30 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/xmpp-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes a XMPP Source. 31 | -------------------------------------------------------------------------------- /supplier/spring-xmpp-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api project(':spring-xmpp-common') 3 | 4 | testImplementation project(':spring-function-test-support') 5 | } 6 | -------------------------------------------------------------------------------- /supplier/spring-xmpp-supplier/src/main/java/org/springframework/cloud/fn/supplier/xmpp/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The XMPP supplier classes. 3 | */ 4 | package org.springframework.cloud.fn.supplier.xmpp; 5 | -------------------------------------------------------------------------------- /supplier/spring-xmpp-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.xmpp.XmppSupplierConfiguration 2 | -------------------------------------------------------------------------------- /supplier/spring-zeromq-supplier/README.adoc: -------------------------------------------------------------------------------- 1 | = ZeroMQ Supplier 2 | 3 | A basic ZeroMQ supplier that produced messages through TCP connection. 4 | The `Supplier` uses the `ZeroMqMessageProducer` from Spring Integration. 5 | This supplier gives you a reactive stream of messages and the supplier has a signature of `Supplier>>`. 6 | Users have to subscribe to this `Flux` and receive the data. 7 | 8 | == Beans for injection 9 | 10 | You can import the `ZeroMqSupplierConfiguration` in the application and then inject the following bean. 11 | 12 | `zeromqSupplier` 13 | 14 | You need to inject this as `Supplier>>`. 15 | 16 | You can use `zeromqSupplier` as a qualifier when injecting. 17 | 18 | Once injected, you can use the `get` method of the `Supplier` to invoke it and then subscribe to the returned `Flux`. 19 | 20 | == Configuration Options 21 | 22 | All configuration properties are prefixed with `zeromq.supplier`. 23 | 24 | For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/supplier/zeromq/ZeroMqSupplierProperties.java[ZeroMqSupplierProperties]. 25 | 26 | == Tests 27 | 28 | See this link:src/test/java/org/springframework/cloud/fn/supplier/zeromq/ZeroMqSupplierConfigurationTests.java[test suite] for the various ways, this supplier is used. 29 | 30 | == Other usage 31 | 32 | See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/zeromq-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes a ZeroMQ Source. -------------------------------------------------------------------------------- /supplier/spring-zeromq-supplier/build.gradle: -------------------------------------------------------------------------------- 1 | dependencies { 2 | api 'org.springframework.integration:spring-integration-zeromq' 3 | } 4 | -------------------------------------------------------------------------------- /supplier/spring-zeromq-supplier/src/main/java/org/springframework/cloud/fn/supplier/zeromq/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * The ZeroMQ supplier auto-configuration support. 3 | */ 4 | package org.springframework.cloud.fn.supplier.zeromq; 5 | -------------------------------------------------------------------------------- /supplier/spring-zeromq-supplier/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | org.springframework.cloud.fn.supplier.zeromq.ZeroMqSupplierConfiguration 2 | --------------------------------------------------------------------------------