From bdbe8bc23168ee41ac1d480e47f8f1e8f8495a9b Mon Sep 17 00:00:00 2001 From: Soby Chacko Date: Wed, 27 May 2020 13:21:53 -0400 Subject: [PATCH] Adding REAMDE for all the supplier modules Resolves https://github.com/spring-cloud/stream-applications/issues/14 Resolves https://github.com/spring-cloud/stream-applications/issues/18 Resolves https://github.com/spring-cloud/stream-applications/issues/10 Resolves https://github.com/spring-cloud/stream-applications/issues/8 * Addressing PR review comments --- supplier/file-supplier/README.adoc | 35 +++++++++++++++++++++++++++ supplier/http-supplier/README.adoc | 33 +++++++++++++++++++++++++ supplier/jdbc-supplier/README.adoc | 34 ++++++++++++++++++++++++++ supplier/mongodb-supplier/README.adoc | 34 ++++++++++++++++++++++++++ supplier/mqtt-supplier/README.adoc | 34 ++++++++++++++++++++++++++ supplier/tcp-supplier/README.adoc | 34 ++++++++++++++++++++++++++ supplier/time-supplier/README.adoc | 31 ++++++++++++++++++++++++ 7 files changed, 235 insertions(+) create mode 100644 supplier/file-supplier/README.adoc create mode 100644 supplier/http-supplier/README.adoc create mode 100644 supplier/jdbc-supplier/README.adoc create mode 100644 supplier/mongodb-supplier/README.adoc create mode 100644 supplier/mqtt-supplier/README.adoc create mode 100644 supplier/tcp-supplier/README.adoc create mode 100644 supplier/time-supplier/README.adoc diff --git a/supplier/file-supplier/README.adoc b/supplier/file-supplier/README.adoc new file mode 100644 index 00000000..4e0caccb --- /dev/null +++ b/supplier/file-supplier/README.adoc @@ -0,0 +1,35 @@ +# File Supplier + +This module provides a File supplier that can be reused and composed in other applications. +The `Supplier` uses the `FileInboundChannelAdapter` from Spring Integration. +`FileSupplier` is implemented as a `java.util.function.Supplier`. +This supplier gives you a reactive stream of files from the provided directory as the supplier has a signature of `Supplier>>`. +Users have to subscribe to this `Flux` and receive the data. + +## Beans for injection + +You can import the `FileSupplierConfiguration` in the application and then inject the following bean. + +`fileSupplier` + +You need to inject this as `Supplier>>`. + +You can use `fileSupplier` as a qualifier when injecting. + +Once injected, you can use the `get` method of the `Supplier` to invoke it and then subscribe to the returned `Flux`. + +## Configuration Options + +All configuration properties are prefixed with `file.supplier`. +There are also properties that need to be used with the prefix `file.consumer`. + +For more information on the various options available, please see https://github.com/spring-cloud/stream-applications/blob/master/functions/supplier/file-supplier/src/main/java/org/springframework/cloud/fn/supplier/file/FileSupplierProperties.java[FileSupplierProperties]. +See https://github.com/spring-cloud/stream-applications/blob/master/functions/supplier/file-supplier/src/main/java/org/springframework/cloud/fn/supplier/file/FileConsumerProperties.java[this] also. + +## Tests + +See this https://github.com/spring-cloud/stream-applications/tree/master/functions/supplier/file-supplier/src/test/java/org/springframework/cloud/fn/supplier/file[test suite] for the various ways, this supplier is used. + +## Other usage + +See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/file-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes a File Source. \ No newline at end of file diff --git a/supplier/http-supplier/README.adoc b/supplier/http-supplier/README.adoc new file mode 100644 index 00000000..25f6d226 --- /dev/null +++ b/supplier/http-supplier/README.adoc @@ -0,0 +1,33 @@ +# HTTP Supplier + +This module provides an HTTP supplier that can be reused and composed in other applications. +The `Supplier` uses the `WebFluxInboundEndpoint` from Spring Integration. +`httpSupplier` is implemented as a `java.util.function.Supplier`. +This supplier gives you a reactive stream from the http endpoint. The supplier has a signature of `Supplier>>`. +Users have to subscribe to this `Flux` and then receive the data. + +## Beans for injection + +You can import the `HttpSupplierConfiguration` in the application and then inject the following bean. + +`httpSupplier` + +You need to inject this as `Supplier>>`. + +You can use `httpSupplier` as a qualifier when injecting. + +Once injected, you can use the `get` method of the `Supplier` to invoke it and then subscribe to the returned `Flux`. + +## Configuration Options + +All configuration properties are prefixed with `http`. + +For more information on the various options available, please see https://github.com/spring-cloud/stream-applications/blob/master/functions/supplier/http-supplier/src/main/java/org/springframework/cloud/fn/supplier/http/HttpSupplierProperties.java[FileSupplierProperties]. + +## Tests + +See this https://github.com/spring-cloud/stream-applications/blob/master/functions/supplier/http-supplier/src/test/java/org/springframework/cloud/fn/supplier/http/HttpSupplierApplicationTests.java[test suite] for the various ways, this supplier is used. + +## Other usage + +See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/http-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes an HTTP Source. \ No newline at end of file diff --git a/supplier/jdbc-supplier/README.adoc b/supplier/jdbc-supplier/README.adoc new file mode 100644 index 00000000..0e033cc0 --- /dev/null +++ b/supplier/jdbc-supplier/README.adoc @@ -0,0 +1,34 @@ +# JDBC Supplier + +This module provides a JDBC supplier that can be reused and composed in other applications. +The `Supplier` uses the `JdbcPollingChannelAdapter` from Spring Integration. +`JdbcSupplier` is implemented as a `java.util.function.Supplier`. +When you have use-cases such as periodical execution of a Database query, based on some external trigger such as a REST endpoint call for example, then you can use this `Supplier` to query the underlying relational database. + +## Beans for injection + +You can import the `JdbcSupplierConfiguration` in the application and then inject the following bean. + +`jdbcSupplier` + +You can inject it as `Supplier` when you are not splitting the rows. +If you are splitting the output, you need to inject this as `Supplier>>`. + +You can use `jdbcSupplier` as a qualifier when injecting. + +Once injected, you can use the `get` method of the `Supplier` to invoke it. +In the case of splitting you get a `Flux` which you have to subscribe in your applications. + +## Configuration Options + +All configuration properties are prefixed with `jdbc.supplier`. + +For more information on the various options available, please see https://github.com/spring-cloud/stream-applications/blob/master/functions/supplier/jdbc-supplier/src/main/java/org/springframework/cloud/fn/supplier/jdbc/JdbcSupplierProperties.java[JdbcSupplierProperties] + +## Tests + +See this https://github.com/spring-cloud/stream-applications/tree/master/functions/supplier/jdbc-supplier/src/test/java/org/springframework/cloud/fn/supplier/jdbc[test suite] for the various ways, this supplier is used. + +## Other usage + +See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/jdbc-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes a JDBC Source. \ No newline at end of file diff --git a/supplier/mongodb-supplier/README.adoc b/supplier/mongodb-supplier/README.adoc new file mode 100644 index 00000000..435e06a5 --- /dev/null +++ b/supplier/mongodb-supplier/README.adoc @@ -0,0 +1,34 @@ +# MongoDB Supplier + +This module provides a MongoDB supplier that can be reused and composed in other applications. +The `Supplier` uses the `MongoDBMessageSource` from Spring Integration. +`MongoDBSupplier` is implemented as a `java.util.function.Supplier`. +When you have use-cases such as periodical execution of querying MongoDB, based on some external trigger such as a REST endpoint call for example, then you can use this `Supplier` to query. + +## Beans for injection + +You can import the `MongoDBSupplierConfiguration` in the application and then inject the following bean. + +`mongoDBSupplier` + +You can inject it as `Supplier` when you are not splitting the rows. +If you are splitting the output, you need to inject this as `Supplier>>`. + +You can use `mongoDBSupplier` as a qualifier when injecting. + +Once injected, you can use the `get` method of the `Supplier` to invoke it. +In the case of splitting you get a `Flux` which you have to subscribe in your applications. + +## Configuration Options + +All configuration properties are prefixed with `mongodb.supplier`. + +For more information on the various options available, please see https://github.com/spring-cloud/stream-applications/blob/master/functions/supplier/mongodb-supplier/src/main/java/org/springframework/cloud/fn/supplier/mongo/MongodbSupplierProperties.java[MongoDBSupplierProperties] + +## Tests + +See this https://github.com/spring-cloud/stream-applications/blob/master/functions/supplier/mongodb-supplier/src/test/java/org/springframework/cloud/fn/supplier/mongo/MongodbSupplierApplicationTests.java[test suite] for the various ways, this supplier is used. + +## Other usage + +See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/mongodb-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes a MongoDB Source. \ No newline at end of file diff --git a/supplier/mqtt-supplier/README.adoc b/supplier/mqtt-supplier/README.adoc new file mode 100644 index 00000000..2894d509 --- /dev/null +++ b/supplier/mqtt-supplier/README.adoc @@ -0,0 +1,34 @@ +# MQTT Supplier + +This module provides an MQTT supplier that can be reused and composed in other applications. +The `Supplier` uses the `MqttPahoMessageDrivenChannelAdapter` from Spring Integration. +`mqttSupplier` is implemented as a `java.util.function.Supplier`. +This supplier gives you a reactive stream from MQTT sources. The supplier has a signature of `Supplier>>`. +Users have to subscribe to this `Flux` and then receive the data. + +## Beans for injection + +You can import the `MqttSupplierConfiguration` in the application and then inject the following bean. + +`mqttSupplier` + +You need to inject this as `Supplier>>`. + +You can use `mqttSupplier` as a qualifier when injecting. + +Once injected, you can use the `get` method of the `Supplier` to invoke it and then subscribe to the returned `Flux`. + +## Configuration Options + +All configuration properties are prefixed with `mqtt.supplier` and `mqtt`. + +For more information on the various options available, please see https://github.com/spring-cloud/stream-applications/blob/master/functions/supplier/mqtt-supplier/src/main/java/org/springframework/cloud/fn/supplier/mqtt/MqttSupplierProperties.java[MqttSupplierProperties]. + +## Tests + +See this https://github.com/spring-cloud/stream-applications/blob/master/functions/supplier/mqtt-supplier/src/test/java/org/springframework/cloud/fn/supplier/mqtt/MqttSupplierTests.java[test suite] for the various ways, this supplier is used. +In addition to this, there is also https://github.com/spring-cloud/stream-applications/blob/master/functions/common/mqtt-common/src/main/java/org/springframework/cloud/fn/common/mqtt/MqttProperties.java[this set of properties] to consider. + +## Other usage + +See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/mqtt-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes an MQTT Source. \ No newline at end of file diff --git a/supplier/tcp-supplier/README.adoc b/supplier/tcp-supplier/README.adoc new file mode 100644 index 00000000..0fbca3b0 --- /dev/null +++ b/supplier/tcp-supplier/README.adoc @@ -0,0 +1,34 @@ +# TCP Supplier + +This module provides a TCP supplier that can be reused and composed in other applications. +The `Supplier` uses the `TcpReceivingChannelAdapter` from Spring Integration. +`tcpSupplier` is implemented as a `java.util.function.Supplier`. +This supplier gives you a reactive stream from TCP sources. The supplier has a signature of `Supplier>>`. +Users have to subscribe to this `Flux` and then receive the data. + +## Beans for injection + +You can import the `TcpSupplierConfiguration` in the application and then inject the following bean. + +`tcpSupplier` + +You need to inject this as `Supplier>>`. + +You can use `tcpSupplier` as a qualifier when injecting. + +Once injected, you can use the `get` method of the `Supplier` to invoke it and then subscribe to the returned `Flux`. + +## Configuration Options + +All configuration properties are prefixed with `tcp.supplier` and `tcp`. + +For more information on the various options available, please see https://github.com/spring-cloud/stream-applications/blob/master/functions/supplier/tcp-supplier/src/main/java/org/springframework/cloud/fn/supplier/tcp/TcpSupplierProperties.java[TcpSupplierProperties]. +In addition to this, there is also https://github.com/spring-cloud/stream-applications/blob/master/functions/common/tcp-common/src/main/java/org/springframework/cloud/fn/common/tcp/TcpConnectionFactoryProperties.java[this set of properties] to consider. + +## Tests + +See this https://github.com/spring-cloud/stream-applications/tree/master/functions/supplier/tcp-supplier/src/test/java/org/springframework/cloud/fn/supplier/tcp[test suite] for the various ways, this supplier is used. + +## Other usage + +See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/tcp-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes an TCP Source. \ No newline at end of file diff --git a/supplier/time-supplier/README.adoc b/supplier/time-supplier/README.adoc new file mode 100644 index 00000000..6805cabc --- /dev/null +++ b/supplier/time-supplier/README.adoc @@ -0,0 +1,31 @@ +# Time Supplier + +This module provides a Time supplier that can be reused and composed in other applications. +The `Supplier` uses the `FastDateFormat` from Apache Commons library. +`timeSupplier` is implemented as a `java.util.function.Supplier`. + +## Beans for injection + +You can import the `TimeSupplierConfiguration` in the application and then inject the following bean. + +`timeSupplier` + +You need to inject this as `Supplier`. + +You can use `timeSupplier` as a qualifier when injecting. + +Once injected, you can use the `get` method of the `Supplier` to invoke it. + +## Configuration Options + +All configuration properties are prefixed with `time`. + +For more information on the various options available, please see https://github.com/spring-cloud/stream-applications/blob/master/functions/supplier/time-supplier/src/main/java/org/springframework/cloud/fn/supplier/time/TimeSupplierProperties.java[TimeSupplierProperties]. + +## Tests + +See this https://github.com/spring-cloud/stream-applications/tree/master/functions/supplier/time-supplier/src/test/java/org/springframework/cloud/fn/supplier/time[test suite] for the various ways, this supplier is used. + +## Other usage + +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. \ No newline at end of file