Clean up README files, fix typos and broken links

This commit is contained in:
Artem Bilan
2024-03-20 15:57:35 -04:00
parent 1611f9475c
commit 77112eb8a1
49 changed files with 330 additions and 346 deletions

View File

@@ -2,7 +2,7 @@
This module provides a generic https://debezium.io/documentation/reference/development/engine.html[DebeziumEngine.Builder] auto-configuration that can be reused and composed in other applications.
IMPORTANT: The `DebeziumEngine` does not required Kafka or Kafka Connect as it runs embedded inside your application.
IMPORTANT: The `DebeziumEngine` does not require Apache Kafka or Kafka Connect as it runs embedded inside your application.
This approach though comes with some delivery guarantee limitations as explained https://debezium.io/documentation/reference/development/engine.html#%5Fhandling_failures[here].
The `Debezium Engine` is a https://en.wikipedia.org/wiki/Change_data_capture[Change Data Capture] (CDC) utility, that allows *capturing* database change events and process them with custom `java.util.Consumer` or `io.debezium.engine.ChangeConsumer` event handler implementations.
@@ -56,8 +56,9 @@ For example the postgres debezium connector dependency looks like this:
compile "io.debezium:debezium-connector-postgres:{debezium-version}"
----
====
[[changeEvent-handler]]
### ChangeEvent Handler
=== ChangeEvent Handler
To process the incoming change events, implement a `java.util.Consumer<ChangeEvent>` (or `ChangeConsumer<ChangeEvent>`) handler and wire it into the `DebeziumEngine.Builder`.
Then build an engine from the builder and run it from within an Executor service:
@@ -121,15 +122,10 @@ It is enough to set some consumer into it the `DebeziumEngine.Builder`, build an
[[configuration-options]]
== Configuration Options
$$debezium.header-format$$:: `ChangeEvent` header format.
*(default and only option at the moment: `JSON`)*
$$debezium.payload-format$$:: `ChangeEvent` Key and Payload formats.
*($$DebeziumFormat$$, default: `JSON`, possible values: `JSON`,`AVRO`,`PROTOBUF`)*
$$debezium.offset-commit-policy$$:: The policy that defines when the offsets should be committed to offset storage.
*($$DebeziumOffsetCommitPolicy$$, default: `PERIODIC`, possible values: `ALWAYS`,`PERIODIC`,`DEFAULT`)*
$$debezium.properties$$:: $$Spring pass-trough wrapper for debezium configuration properties.
All properties with a `debezium.properties.*` prefix are native Debezium properties.$$ *($$Map<String, String>$$, default: `$$<none>$$`)*.
For example the `debezium.properties.connector.class` property is converted into `connector.class` before provided to the DebeziumEngine.
The configuration properties for this module are prefixed with a `debezium`.
For example the `debezium.properties.connector.class` property is converted into `connector.class` before provided to the `DebeziumEngine`.
See more information in the link:src/main/java/org/springframework/cloud/fn/common/debezium/DebeziumProperties.java[DebeziumProperties].
Here is an example configuration for the sample snipped above:
@@ -172,7 +168,7 @@ Defaults to JSON with binary encoding.
=== Connectors properties
The table below lists all available Debezium properties for each connecter.
The table below lists all available Debezium properties for each connector.
.Table of the native Debezium configuration properties for every connector.
|===
@@ -249,9 +245,9 @@ The Debezium builder auto-configuration provides an opinionated implementation f
- `Clock` - Clock needing to determine the current time.
Defaults to the `Clock#systemDefaultZone()` system clock.
- `CompletionCallback` - callback called by the engine on `DebeziumEngine#run()` method completes with the results.
By default logs the completion status.
By default, logs the completion status.
- `ConnectorCallback` - During the engine run, provides feedback about the the completion state of each component running within the engine (connectors, tasks etc).
By default logs the connector state.
By default, logs the connector state.
You can override any of the above components.
Just provide your `@Bean` implementation to the application context.
@@ -277,7 +273,7 @@ debezium.properties.transforms.flattening.add.fields=name,db # <5>
<3> Debezium generates a tombstone record for each DELETE operation.
The default behavior is that event flattening removes tombstone records from the stream.
To keep tombstone records in the stream, specify drop.tombstones=false.
<4> Debezium generates a change event event for each DELETE operation.
<4> Debezium generates a change event for each DELETE operation.
The `rewrite` mode keeps those events, which a dropped otherwise.
<5> Comma-separated list of metadata fields to add to the header and the value of the simplified event value.
@@ -292,7 +288,7 @@ Out of the box, the following https://debezium.io/documentation/reference/develo
==== In-Memory
Doesn't persist the offset data but keeps it in memory.
Therefore all offsets are lost on debezium source restart.
Therefore, all offsets are lost on debezium source restart.
=====
[source, bash]
@@ -344,7 +340,7 @@ One can implement the `org.apache.kafka.connect.storage.OffsetBackingStore` inte
== Tests
See this link:org/springframework/cloud/fn/common/debezium/DebeziumEngineBuilderAutoConfigurationIntegrationTest.java[test suite] for how to use the auto-configuration with custom Consumer.
See this link:src/test/java/org/springframework/cloud/fn/common/debezium/DebeziumEngineBuilderAutoConfigurationIntegrationTests.java[test suite] for how to use the auto-configuration with custom Consumer.
== Other usage

View File

@@ -1,9 +1,9 @@
=== `MetadataStore` Common Module
This artifact contains a Spring Boot auto-configuration for the `MetadataStore`which can be used in various Spring Integration scenarios, like file polling, idempotent receiver, offset management etc.
See Spring Integration "`https://docs.spring.io/spring-integration/docs/5.0.6.RELEASE/reference/html/system-management-chapter.html#metadata-store[Reference Manual]`" for more information.
This artifact contains a Spring Boot auto-configuration for the `MetadataStore` which can be used in various Spring Integration scenarios, like file polling, idempotent receiver, offset management etc.
See Spring Integration https://docs.spring.io/spring-integration/reference/meta-data-store.html[Reference Manual] for more information.
In addition to the standard Spring Boot configuration properties this module exposes a `MetadataStoreProperties` with the `metadata.store` prefix.
In addition to the standard Spring Boot configuration properties this module exposes a link:src/main/java/org/springframework/cloud/fn/common/metadata/store/MetadataStoreProperties.java[MetadataStoreProperties] class with the `metadata.store` prefix.
To auto-configure particular `MetadataStore` you need to set `metadata.store.type` and include the respective dependencies into the target app starter:
@@ -29,7 +29,7 @@ $$metadata.store.redis.key$$:: $$Redis key for metadata.$$ *($$String$$, default
==== MongoDb
The `MongoDbMetadataStore` requires regular Spring Boot auto-configuration for https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-mongodb[Spring Data MongoDB] and minimal set of dependencies is like this:
The `MongoDbMetadataStore` requires regular Spring Boot auto-configuration for https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#data.nosql.mongodb[Spring Data MongoDB] and minimal set of dependencies is like this:
[source,xml]
----
@@ -49,7 +49,7 @@ $$metadata.store.mongo-db.collection$$:: $$MongoDB collection name for metadata.
==== Hazelcast
The `HazelcastMetadataStore` requires regular Spring Boot auto-configuration for https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-caching-provider-hazelcast[Hazelcast] and minimal set of dependencies is like this:
The `HazelcastMetadataStore` requires regular Spring Boot auto-configuration for https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#io.caching.provider.hazelcast[Hazelcast] and minimal set of dependencies is like this:
[source,xml]
----
@@ -81,11 +81,11 @@ $$metadata.store.zookeeper.encoding$$:: $$Encoding to use when storing data in Z
$$metadata.store.zookeeper.root$$:: $$Root node - store entries are children of this node.$$ *($$String$$, default: `$$/SpringIntegration-MetadataStore$$`)*
In addition, for the `ZookeeperMetadataStore`, a `MetadataStoreListener` bean can be configured in the application context to react to the `MetadataStore` events.
Also a `CuratorFramework` bean can be provided to override a default auto-configured one.
Also, a `CuratorFramework` bean can be provided to override a default auto-configured one.
==== AWS DymanoDb
The `DynamoDbMetadataStore` requires regular Spring Cloud AWS auto-configuration for https://cloud.spring.io/spring-cloud-static/spring-cloud-aws/2.0.0.RELEASE/single/spring-cloud-aws.html#_spring_boot_auto_configuration[Spring Boot] and minimal set of dependencies is like this:
The `DynamoDbMetadataStore` requires regular Spring Cloud AWS auto-configuration for https://docs.awspring.io/spring-cloud-aws/docs/3.1.0/reference/html/index.html#spring-cloud-aws-dynamoDb[Spring Boot] and minimal set of dependencies is like this:
[source,xml]
----
@@ -112,7 +112,7 @@ A default, auto-configured `AmazonDynamoDBAsync` bean can be overridden in the t
==== JDBC
The `JdbcMetadataStore` requires regular Spring Boot auto-configuration for https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-sql[JDBC DataSource] and minimal set of dependencies is like this:
The `JdbcMetadataStore` requires regular Spring Boot auto-configuration for https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#data.sql[JDBC DataSource] and minimal set of dependencies is like this:
[source,xml]
----

View File

@@ -1,4 +1,4 @@
# Analytics Consumer
= Analytics Consumer
The `analytics-consumer` is a Java https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html[Consumer<Message<?>>] that computes analytics from the input data messages and publishes them as metrics to various monitoring systems.
It leverages the https://micrometer.io[micrometer library] for providing a uniform programming experience across the most popular https://micrometer.io/docs[monitoring systems] and uses https://docs.spring.io/spring-integration/reference/html/spel.html#spel[Spring Expression Language (SpEL)] for defining how the metric names, values and tags are computed from the input data.
@@ -8,11 +8,12 @@ The analytics-consumer can produce two metrics types:
- https://micrometer.io/docs/concepts#_counters[Counter] - reports a single metric, a count, that increments by a fixed, positive amount. Counters can be used for computing the rates of how the data changes in time.
- https://micrometer.io/docs/concepts#_gauges[Gauge] - reports the current value. Typical examples for gauges would be the size of a collection or map or number of threads in a running state.
A https://micrometer.io/docs/concepts#_meters[Meter] (e.g Counter or Gauge) is uniquely identified by its `name` and `dimensions` (the term dimensions and tags is used interchangeably). Dimensions allow a particular named metric to be sliced to drill down and reason about the data.
A https://micrometer.io/docs/concepts#_meters[Meter] (e.g. Counter or Gauge) is uniquely identified by its `name` and `dimensions` (the term dimensions and tags is used interchangeably). Dimensions allow a particular named metric to be sliced to drill down and reason about the data.
NOTE: As a metrics is uniquely identified by its `name` and `dimensions`, you can assign multiple tags (e.g. key/value pairs) to every metric, but you cannot randomly change those tags afterwards! Monitoring systems such as Prometheus will complain if a metric with the same name has different sets of tags.
NOTE: As a metrics is uniquely identified by its `name` and `dimensions`, you can assign multiple tags (e.g. key/value pairs) to every metric, but you cannot randomly change those tags afterward!
Monitoring systems such as Prometheus will complain if a metric with the same name has different sets of tags.
## Beans for injection
== Beans for injection
Add the analytics-consumer dependency to your POM:
@@ -25,7 +26,7 @@ Add the analytics-consumer dependency to your POM:
</dependency>
----
Import the https://github.com/spring-cloud/stream-applications/blob/master/functions/consumer/analytics-consumer/src/main/java/org/springframework/cloud/fn/consumer/analytics/AnalyticsConsumerConfiguration.java[AnalyticsConsumerConfiguration] in the application and inject the following consumer bean:
The `AnalyticsConsumerConfiguration` auto-configures the following consumer bean:
[source,java]
----
@@ -52,9 +53,9 @@ analytics.amount-expression=payload.lenght()
analytics.tag.expression.my_tag=headers['kind']
----
Review the https://github.com/spring-cloud/stream-applications/blob/master/functions/consumer/analytics-consumer/src/main/java/org/springframework/cloud/fn/consumer/analytics/AnalyticsConsumerProperties.java[AnalyticsConsumerProperties]'s javadocs for further details how to use the SpEL properties.
Review the https://github.com/spring-cloud/stream-applications/blob/master/functions/consumer/analytics-consumer/src/main/java/org/springframework/cloud/fn/consumer/analytics/AnalyticsConsumerProperties.java[AnalyticsConsumerProperties] javadocs for further details how to use the SpEL properties.
By default, Micrometer is packed with a SimpleMeterRegistry that holds the latest value of each meter in memory and doesnt export the data anywhere.
By default, Micrometer is packed with a `SimpleMeterRegistry` that holds the latest value of each meter in memory and doesn't export the data anywhere.
To enable support for another monitoring system you have to add the spring-boot-starter-actuator dependency and the micrometer dependency of the monitoring system of choice:
[source,xml]
@@ -62,25 +63,25 @@ To enable support for another monitoring system you have to add the spring-boot-
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>CHANGE TO LATEST VERSION</version>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-[MONITORING SYSTEM NAME]</artifactId>
<version>${micrometer.version}</version>
</dependency>
----
Follow the https://docs.spring.io/spring-boot/docs/2.3.1.RELEASE/reference/html/production-ready-features.html#production-ready-metrics-export[configuration instructions] for the selected monitoring system. All monitoring configuration properties start with a prefix: `management.metrics.export`.
Follow the https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#actuator.metrics[configuration instructions] for the selected monitoring system.
All monitoring configuration properties start with a prefix: `management.metrics.export`.
== Configuration Options
All `analytics-consumer` configuration properties use the `analytics` prefix. For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/analytics/AnalyticsConsumerProperties.java[AnalyticsConsumerProperties].
All `analytics-consumer` configuration properties use the `analytics` prefix.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/analytics/AnalyticsConsumerProperties.java[AnalyticsConsumerProperties].
All monitoring configuration properties start with a prefix `management.metrics.export`. For configuring a particular monitoring system follow the provided https://docs.spring.io/spring-boot/docs/2.3.1.RELEASE/reference/html/production-ready-features.html#production-ready-metrics-export[configuration instructions].
All monitoring configuration properties start with a prefix `management.metrics.export`.
==== Sample Configuration
=== Sample Configuration
Following examples show how to configure `counter` and `gauge` metrics over a series of stock-exchange messages like this:
@@ -99,51 +100,54 @@ Following examples show how to configure `counter` and `gauge` metrics over a se
The following configuration will create a `counter` metrics called `stockrates` with two tags: `symbol` and `exchange` computed from the json fields:
.Counter Metrcis Configuration - count stock transactions
.Counter Metrics Configuration - count stock transactions
|===
|Property |Description
|analytics.meter-type=counter
|`analytics.meter-type=counter`
|Counter meter type (default)
|analytics.name=stockrates
|`analytics.name=stockrates`
|Metrics name
|analytics.tag.expression.symbol=#jsonPath(payload,'$.data.symbol')
|`analytics.tag.expression.symbol=#jsonPath(payload,'$.data.symbol')`
|Add tag `symbol` equal to the `date.symbol` field in the json messages.
|analytics.tag.expression.exchange=#jsonPath(payload,'$.data.exchange')
|`analytics.tag.expression.exchange=#jsonPath(payload,'$.data.exchange')`
|Add tag `exchange` equal to the `date.exchange` field in the json messages.
|===
Now you can use the `stockrates` metrics to measure the rates at which the stock transactions occur over a given time interval. Furthermore, you can aggregate those rates by the `symbol` and `exchange` tags.
Now you can use the `stockrates` metrics to measure the rates at which the stock transactions occur over a given time interval.
Furthermore, you can aggregate those rates by the `symbol` and `exchange` tags.
To measure the transaction volumes contained in the data.volume JSON fields, you can build a GAUGE metrics like this:
To measure the transaction volumes contained in the `data.volume` JSON fields, you can build a GAUGE metrics like this:
.Gauge Metrcis Configuration - compute stock volumes
.Gauge Metrics Configuration - compute stock volumes
|===
|Property |Description
|analytics.meter-type=gauge
|`analytics.meter-type=gauge`
|Gauge meter type
|analytics.name=stockvolumes
|`analytics.name=stockvolumes`
|Metrics name
|analytics.tag.expression.symbol=#jsonPath(payload,'$.data.symbol')
|`analytics.tag.expression.symbol=#jsonPath(payload,'$.data.symbol')`
|Add tag `symbol` equal to the `date.symbol` field in the json messages.
|analytics.tag.expression.exchange=#jsonPath(payload,'$.data.exchange')
|`analytics.tag.expression.exchange=#jsonPath(payload,'$.data.exchange')`
|Add tag `exchange` equal to the `date.exchange` field in the json messages.
|analytics.tag.amount-expression=#jsonPath(payload,'$.data.volume')
|`analytics.tag.amount-expression=#jsonPath(payload,'$.data.volume')`
|Set the Gauge to the `data/volume` field values.
|===
Then use the `stockvolumes` metrics to graph, in real-time, the transaction volumes changes over time. You can aggregate those volumes by the `symbol` and `exchange` tags.
WARNING: Micrometer implements the Gauges for the purpose of data sampling! There is no information about what might have occurred between two consecutive samples. Any intermediate values set on a gauge are lost by the time the gauge value is reported to a metrics backend.
WARNING: Micrometer implements the Gauges for the purpose of data sampling!
There is no information about what might have occurred between two consecutive samples.
Any intermediate values set on a gauge are lost by the time the gauge value is reported to a metrics backend.
To enable one or more https://micrometer.io/docs[supported monitoring systems] you need to add a configuration like this:
@@ -151,16 +155,16 @@ To enable one or more https://micrometer.io/docs[supported monitoring systems] y
|===
|Property |Description
|management.metrics.export.wavefront.enabled=true
|`management.metrics.export.wavefront.enabled=true`
|Enable or disable the monitoring system. (enabled by default).
|management.metrics.export.wavefront.uri=YOUR_WAVEFRONT_SERVER_URI
|`management.metrics.export.wavefront.uri=YOUR_WAVEFRONT_SERVER_URI`
|UIR of your Wavefront server or Wavefront Proxy.
|management.metrics.export.wavefront.api-token=YOUR_API_TOKEN
|`management.metrics.export.wavefront.api-token=YOUR_API_TOKEN`
|Wavefront access token.
|management.metrics.export.wavefront.source=stock-exchange-demo
|`management.metrics.export.wavefront.source=stock-exchange-demo`
|The `source` is used to distinct your metrics on the Wavefront server.
|===

View File

@@ -1,10 +1,10 @@
# Cassandra Consumer
= Cassandra Consumer
This module provides a Cassandra Consumer that can be reused and composed in other applications.
Internally it uses the `CassandraMessageHandler` from Spring Integration.
`CassandraConsumerFunction` is implemented as a `java.util.function.Function`.
## Beans for injection
== Beans for injection
The `CassnadraConsumerConfiguration` auto-configuration provides the following beans:
@@ -17,17 +17,17 @@ Type for injection: `Function<Object, Mono<? extends WriteResult>>`
You have to subscribe to the returned `Mono` to trigger a communication with Cassandra.
Or use `Consumer<Object> cassandraConsumer` instead which ignores the result and performs just `Mono.block()` before returning.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with either `cassandra.consumer` or `cassandra.cluster`.
All configuration properties are prefixed with `cassandra.consumer` and `cassandra.cluster`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/cassandra/CassandraConsumerProperties.java[CassandraConsumerProperties].
See link:src/main/java/org/springframework/cloud/fn/consumer/cassandra/cluster/CassandraClusterProperties.java[this] also.
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/consumer/cassandra[test suite] for the various ways, this consumer is used.
## Other usage
== Other usage
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.

View File

@@ -1,8 +1,8 @@
# Elasticsearch Consumer
= Elasticsearch Consumer
A consumer that allows you to index document records into Elasticsearch.
## Beans for injection
== Beans for injection
The `ElasticsearchConsumerConfiguration` auto-configuration provides the following bean:
@@ -16,7 +16,7 @@ The JSON document can be provided using one of the following methods.
* `java.util.Map`
* `XContentBuilder` provided by Elasticsearch
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `elasticsearch.consumer`.
@@ -26,10 +26,10 @@ In addition to these options, the consumer makes use of Spring Boot autoconfigur
Therefore, you need to use https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchRestClientProperties.java[these properties] for configuration Elasticsearch.
See this https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-elasticsearch[section] from Spring Boot docs.
## Examples
== Examples
See this link:src/test/java/org/springframework/cloud/fn/consumer/elasticsearch/ElasticsearchConsumerApplicationTests.java[test suite] for seeing the Elasticsearch consumer in action.
## Other usage
== Other usage
See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/elasticsearch-sink/README.adoc[README] where this consumer is used for creating an Elasticsearch sink.

View File

@@ -1,9 +1,9 @@
# File Consumer
= File Consumer
A consumer that allows you to write incoming messages into files.
The consumer uses the `FileWritingMessageHandler` from Spring Integration.
## Beans for injection
== Beans for injection
The `FileConsumerConfiguration` auto-configuration provides the following bean:
@@ -11,7 +11,7 @@ The `FileConsumerConfiguration` auto-configuration provides the following bean:
You can use `fileConsumer` as a qualifier when injecting.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `file.consumer`.
@@ -19,10 +19,10 @@ For more information on the various options available, please see link:src/main/
A `ComponentCustomizer<FileWritingMessageHandler>` bean can be added in the target project to provide any custom options for the `FileWritingMessageHandler` configuration used by the `fileConsumer`.
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/consumer/file[test suite] for the various ways, this consumer is used.
## Other usage
== Other usage
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.

View File

@@ -1,9 +1,9 @@
# Ftp Consumer
= Ftp Consumer
A consumer that allows you to ftp files.
The consumer uses the `FtpMessageHandler` from Spring Integration.
## Beans for injection
== Beans for injection
The `FtpConsumerConfiguration` auto-configuration provides the following bean:
@@ -11,7 +11,7 @@ The `FtpConsumerConfiguration` auto-configuration provides the following bean:
You can use `ftpConsumer` as a qualifier when injecting.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `ftp.consumer`.
@@ -19,10 +19,10 @@ For more information on the various options available, please see link:src/main/
A `ComponentCustomizer<FtpMessageHandlerSpec>` bean can be added in the target project to provide any custom options for the `FtpMessageHandlerSpec` configuration used by the `ftpConsumer`.
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/consumer/ftp[test suite] for the various ways, this consumer is used.
## Other usage
== Other usage
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.

View File

@@ -1,9 +1,9 @@
# Jdbc Consumer
= Jdbc Consumer
A consumer that allows you to insert records into a relational database.
The consumer uses the `JdbcMessageHandler` from Spring Integration.
## Beans for injection
== Beans for injection
The `JdbcConsumerConfiguration` auto-configuration provides the following bean:
@@ -11,16 +11,16 @@ The `JdbcConsumerConfiguration` auto-configuration provides the following bean:
You can use `jdbcConsumer` as a qualifier when injecting.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `jdbc.consumer`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/jdbc/JdbcConsumerProperties.java[JdbcConsumerProperties].
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/consumer/jdbc[test suite] for the various ways, this consumer is used.
## Other usage
== Other usage
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.

View File

@@ -1,15 +1,15 @@
# Apache Kafka Publisher (Consumer function)
= Apache Kafka Publisher (Consumer function)
A `Consumer<Message<?>>` that allows to publish messages to Apache Kafka topic.
## Beans for injection
== Beans for injection
The `KafkaPublisherConfiguration` is an auto-configuration, so no need to import anything.
The `Consumer<Message<?>> kafkaPublisher` bean can be injected into the target service for producing data into Kafka topic.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `kafka.publisher`.
@@ -21,11 +21,8 @@ A `ComponentCustomizer<KafkaProducerMessageHandlerSpec<?, ?, ?>>` bean can be ad
The `KafkaPublisherConfiguration` also exposes 3 `PublishSubscribeChannel`: `kafkaPublisherSuccessChannel`, `kafkaPublisherFailureChannel`, `kafkaPublisherFuturesChannel`.
They are mapped to respective options of the `KafkaProducerMessageHandler`.
They may be subscribed in the target project any possible Spring Integration way.
See more information about `KafkaProducerMessageHandler` configuration and behavior in Spring Integration https://docs.spring.io/spring-integration/docs/current/reference/html/kafka.html#kafka-outbound[documentation].
See more information about `KafkaProducerMessageHandler` configuration and behavior in Spring Integration https://docs.spring.io/spring-integration/docs/current/reference/html/kafka.html=kafka-outbound[documentation].
## Tests
## Other usage
== Other usage
See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/kafka-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream application where it makes an Apache Kafka sink.

View File

@@ -1,9 +1,9 @@
# Log Consumer
= Log Consumer
A consumer that allows you to log the data
The consumer uses the `LoggingMessageHandler` from Spring Integration.
## Beans for injection
== Beans for injection
The `LogConsumerConfiguration` auto-configuration provides the following bean:
@@ -11,16 +11,16 @@ The `LogConsumerConfiguration` auto-configuration provides the following bean:
You can use `logConsumer` as a qualifier when injecting.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `log.consumer`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/log/LogConsumerProperties.java[LogConsumerProperties].
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/consumer/log/LogConsumerApplicationTests.java[test suite] for the various ways, this consumer is used.
## Other usage
== Other usage
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.

View File

@@ -1,8 +1,8 @@
# MongoDB Consumer
= MongoDB Consumer
A consumer that allows you to insert records into MongoDB.
## Beans for injection
== Beans for injection
The `MongoDbConsumerConfiguration` auto-configuration provides the following beans:
@@ -14,7 +14,7 @@ You can use `mongodbConsumer` or `mongodbConsumerFunction` as a qualifier when i
The return value from the function can be ignored as this is used as a consumer to send records to MongoDB.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `mongodb.consumer`.
@@ -22,10 +22,10 @@ For more information on the various options available, please see link:src/main/
A `ComponentCustomizer<ReactiveMongoDbStoringMessageHandler>` bean can be added in the target project to provide any custom options for the `ReactiveMongoDbStoringMessageHandler` configuration used by the `mongodbConsumer`.
## Examples
== Examples
See this link:src/test/java/org/springframework/cloud/fn/consumer/mongo/MongoDbConsumerApplicationTests.java[test suite] for the various ways, this consumer is used.
## Other usage
== Other usage
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.

View File

@@ -1,8 +1,8 @@
# MQTT Consumer
= MQTT Consumer
A consumer that allows you to send messages using the MQTT protocol.
## Beans for injection
== Beans for injection
The `MqttConsumerConfiguration` auto-configuration provides the following bean:
@@ -10,7 +10,7 @@ The `MqttConsumerConfiguration` auto-configuration provides the following bean:
You can use `mqttConsumer` as a qualifier when injecting.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `mqtt.consumer`.
@@ -18,16 +18,16 @@ For more information on the various options available, please see link:src/main/
A `ComponentCustomizer<MqttPahoMessageHandler>` bean can be added in the target project to provide any custom options for the `MqttPahoMessageHandler` configuration used by the `mqttConsumer`.
## SSL Configuration
== SSL Configuration
The MQTT Paho client can accept an SSL configuration via `MqttConnectOptions.setSSLProperties()`.
These properties are exposed on the `MqttProperties.sslProperties` map.
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.
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/consumer/mqtt/MqttConsumerTests.java[test suite] for the various ways, this consumer is used.
## Other usage
== Other usage
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.

View File

@@ -1,8 +1,8 @@
# RabbitMQ Consumer
= RabbitMQ Consumer
A consumer that allows you to send messages to RabbitMQ.
## Beans for injection
== Beans for injection
The `RabbitConsumerConfiguration` auto-configuration provides the following bean:
@@ -10,7 +10,7 @@ The `RabbitConsumerConfiguration` auto-configuration provides the following bean
You can use `rabbitConsumer` as a qualifier when injecting.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `rabbit.consumer`.
@@ -18,9 +18,6 @@ For more information on the various options available, please see link:src/main/
A `ComponentCustomizer<AmqpOutboundChannelAdapterSpec>` bean can be added in the target project to provide any custom options for the `AmqpOutboundChannelAdapterSpec` configuration used by the `rabbitConsumer`.
## Tests
## Other usage
== Other usage
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.

View File

@@ -1,8 +1,8 @@
# Redis Consumer
= Redis Consumer
A consumer that allows you to write incoming messages into Redis.
## Beans for injection
== Beans for injection
The `RedisConsumerConfiguration` auto-configuration provides the following bean:
@@ -10,16 +10,16 @@ The `RedisConsumerConfiguration` auto-configuration provides the following bean:
You can use `redisConsumer` as a qualifier when injecting.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `redis.consumer`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/redis/RedisConsumerProperties.java[RedisConsumerProperties].
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/consumer/redis[test suite] for the various ways, this consumer is used.
## Other usage
== Other usage
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.

View File

@@ -1,9 +1,9 @@
# RSocket Consumer
= RSocket Consumer
A consumer that allows you to communicate to an RSocket route using its fire and forget strategy of execution.
The consumer uses the RSocket support from https://docs.spring.io/spring/docs/current/spring-framework-reference/web-reactive.html#rsocket-requester[Spring Framework].
The consumer uses the RSocket support from https://docs.spring.io/spring-framework/reference/rsocket.html#rsocket-requester[Spring Framework].
## Beans for injection
== Beans for injection
The `RSocketConsumerConfiguration` auto-configuration provides the following beans:
@@ -14,16 +14,16 @@ You can use `rsocketFunctionsConsumer` as a qualifier when injecting.
The returned `Mono` has to be subscribed.
Or `Consumer<Flux<Message<?>>> rsocketConsumer` can be used instead which just does a `Mono.block()` before returning.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `rsocket.consumer`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/rsocket/RsocketConsumerProperties.java[RsocketConsumerProperties].
## Examples
== Examples
See this link:src/test/java/org/springframework/cloud/fn/consumer/rsocket/RsocketConsumerTests.java[test suite] for learning more about this consumer.
## Other usage
== Other usage
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.

View File

@@ -1,8 +1,8 @@
# SFTP Consumer
= SFTP Consumer
A consumer that allows you to SFTP files.
## Beans for injection
== Beans for injection
The `SftpConsumerConfiguration` auto-configuration provides the following bean:
@@ -10,7 +10,7 @@ The `SftpConsumerConfiguration` auto-configuration provides the following bean:
You can use `sftpConsumer` as a qualifier when injecting.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `sftp.consumer`.
@@ -18,10 +18,10 @@ For more information on the various options available, please see link:src/main/
A `ComponentCustomizer<SftpMessageHandlerSpec>` bean can be added in the target project to provide any custom options for the `SftpMessageHandlerSpec` configuration used by the `sftpConsumer`.
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/consumer/sftp[test suite] for the various ways, this consumer is used.
## Other usage
== Other usage
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.

View File

@@ -1,8 +1,8 @@
# TCP Consumer
= TCP Consumer
A consumer that allows you to send TCP messages.
## Beans for injection
== Beans for injection
The `TcpConsumerConfiguration` auto-configuration provides the following bean:
@@ -10,16 +10,16 @@ The `TcpConsumerConfiguration` auto-configuration provides the following bean:
You can use `tcpConsumer` as a qualifier when injecting.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `tcp.consumer`.
For more information on the various options available, please see `TCPConsumerProperties`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/tcp/TcpConsumerProperties.java[TCPConsumerProperties].
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/consumer/tcp[test suite] for the various ways, this consumer is used.
## Other usage
== Other usage
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.

View File

@@ -1,7 +1,7 @@
# Twitter Consumers
= Twitter Consumers
## 1. Twitter Status Update Consumer.
== 1. Twitter Status Update Consumer.
Updates the authenticating user's current text (e.g. Tweeting).
@@ -16,7 +16,7 @@ If the number of updates posted by the user reaches the current allowed limit th
You can find details for the Update API here: https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-statuses-update
### 1.1 Beans for injection
=== 1.1 Beans for injection
The `TwitterUpdateConsumerConfiguration` auto-configuration provides this beans:
@@ -30,7 +30,7 @@ Note: the Message content is expected to be in text format. Consider using the `
You can use `twitterUpdateStatusConsumer` as a qualifier when injecting.
### 1.2 Configuration Options
=== 1.2 Configuration Options
All configuration properties are prefixed with `twitter.update`.
@@ -38,11 +38,11 @@ For more information on the various options available, please see link:src/main/
The twitter function makes uses of link:../spel-function/README.adoc[SpEL function].
### 1.3 Other usage
=== 1.3 Other usage
See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/twitter-update-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream application where it makes a Twitter Update sink.
## 2. Twitter Message Consumer.
== 2. Twitter Message Consumer.
Send Direct Messages to a specified user from the authenticating user.
Requires a JSON POST body and `Content-Type` header to be set to `application/json`.
@@ -54,7 +54,7 @@ This behavior only applies when using the POST direct_messages/events/new endpoi
SpEL expressions are used to compute the request parameters from the input message.
### 2.1 Beans for injection
=== 2.1 Beans for injection
The `TwitterMessageConsumerConfiguration` auto-configuration provides this beans:
@@ -64,7 +64,7 @@ Note: the Message content is expected to be in text format. Consider using the `
You can use `twitterSendMessageConsumer` as a qualifier when injecting.
### 2.2 Configuration Options
=== 2.2 Configuration Options
All configuration properties are prefixed with `twitter.message.update`.
@@ -72,11 +72,11 @@ For more information on the various options available, please see link:src/main/
The twitter function makes uses of link:../spel-function/README.adoc[SpEL function].
### 2.3 Other usage
=== 2.3 Other usage
See this https://github.com/spring-cloud/stream-applications/blob/master/applications/sink/twitter-message-sink/README.adoc[README] where this consumer is used to create a Spring Cloud Stream application where it makes a Twitter Message sink.
## 3. Twitter Friendship Consumer.
== 3. Twitter Friendship Consumer.
Allows creating `follow`, `unfollow` and `update` relationships with specified `userId` or `screenName`.
The `twitter.friendships.sink.type` property allows to select the desired friendship operation.
@@ -90,7 +90,7 @@ Changes will be eventually consistent.
SpEL expressions are used to compute the request parameters from the input message.
Every operation type has its own parameters.
### 3.1 Beans for injection
=== 3.1 Beans for injection
The `TwitterFriendshipsConsumerConfiguration` auto-configuration provides this beans:
@@ -100,7 +100,7 @@ Note: the Message content is expected to be in text format. Consider using the `
You can use `twitterFriendshipConsumer` as a qualifier when injecting.
### 3.2 Configuration Options
=== 3.2 Configuration Options
All configuration properties are prefixed with `twitter.friendships.update`.

View File

@@ -1,8 +1,8 @@
# Wavefront Consumer
= Wavefront Consumer
This module provides a Wavefront Consumer that can be reused and composed in other applications.
## Beans for injection
== Beans for injection
You can import the `WavefrontConsumerConfiguration` in the application and then inject the following bean.
@@ -14,16 +14,16 @@ Type for injection: `Consumer<Message<?>>`
You can ignore the return value from the function as this is a consumer and simply will send the data to Wavefront.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `wavefront`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/wavefront/WavefrontConsumerProperties.java[WavefrontConsumerProperties].
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/consumer/wavefront[test suite] for the various ways, this consumer is used.
## Other usage
== Other usage
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.

View File

@@ -1,8 +1,8 @@
# Websocket Consumer
= Websocket Consumer
A consumer that allows you to send messages using websocket.
## Beans for injection
== Beans for injection
The `WebsocketConsumerConfiguration` auto-configuration provides the following bean:
@@ -10,16 +10,16 @@ The `WebsocketConsumerConfiguration` auto-configuration provides the following b
You can use `websocketConsumer` as a qualifier when injecting.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `websocket.consumer`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/websocket/WebsocketConsumerProperties.java[WebsocketConsumerProperties].
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/consumer/websocket[test suite] for the various ways, this consumer is used.
## Other usage
== Other usage
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.

View File

@@ -1,8 +1,8 @@
# XMPP Consumer
= XMPP Consumer
A consumer that allows you to send messages through a XMPP server.
A consumer that allows you to send messages through an XMPP server.
## Beans for injection
== Beans for injection
You can import the `XmppConsumerConfiguration` in the application and then inject the following bean.
@@ -15,16 +15,16 @@ You can use `xmppConsumer` as a qualifier when injecting.
**NOTE:** This is a functional endpoint. One will need to subscribe to this endpoint in order to start accepting data
on it.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `xmpp.consumer`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/xmpp/XmppConsumerProperties.java[XmppConsumerProperties].
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/consumer/xmpp/[test suite] for the various ways, this consumer is used.
## Other usage
== Other usage
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.

View File

@@ -1,8 +1,8 @@
# ZeroMQ Consumer
= ZeroMQ Consumer
A consumer that allows you to send messages through a ZeroMQ socker.
## Beans for injection
== Beans for injection
You can import the `ZeroMqConsumerConfiguration` in the application and then inject the following bean.
@@ -12,19 +12,18 @@ You need to inject this as `Function<Flux<Message<?>>, Mono<Void>> zeromqConsume
You can use `zeromqConsumer` as a qualifier when injecting.
**NOTE:** This is a functional endpoint. One will need to subscribe to this endpoint in order to start accepting data
on it.
**NOTE:** This is a functional endpoint. One will need to subscribe to this endpoint in order to start accepting data on it.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `zeromq.consumer`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/zeromq/ZeroMqConsumerProperties.java[ZeroMqConsumerProperties].
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/consumer/zeromq/[test suite] for the various ways, this consumer is used.
## Other usage
== Other usage
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.

View File

@@ -1,8 +1,8 @@
# Aggregator Function
= Aggregator Function
This module provides an aggregation function that can be reused and composed in other applications.
## Beans for injection
== Beans for injection
You can import the `AggregatorFunctionConfiguration` in a Spring Boot application and then inject the following bean.
@@ -12,16 +12,16 @@ You can use `aggregatorFunction` as a qualifier when injecting.
Once injected, you can use the `apply` method of the `Function` to invoke it and get the result.
## Configuration Options
== Configuration Options
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/aggregator/AggregatorFunctionProperties.java[AggregatorFunctionProperties.java]
A `ComponentCustomizer<AggregatorFactoryBean>` bean can be added in the target project to provide any custom options for the `AggregatorFactoryBean` configuration used by the `aggregatorFunction` definition.
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/aggregator/AggregatorFunctionApplicationTests.java[test suite] for examples of how this function is used.
See this link:src/test/java/org/springframework/cloud/fn/aggregator/AbstractAggregatorFunctionTests.java[test suite] for examples of how this function is used.
## Other usage
== Other usage
See this link:../../../applications/processor/aggregator-processor/README.adoc[README] where this function is used to create a Spring Cloud Stream application.
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.

View File

@@ -1,8 +1,8 @@
# Filter Function
= Filter Function
This module provides a filter function that can be reused and composed in other applications.
## Beans for injection
== Beans for injection
The `FilterFunctionConfiguration` auto-configuration provides following bean:
@@ -12,16 +12,16 @@ You can use `filterFunction` as a qualifier when injecting.
Once injected, you can use the `apply` method of the `Function` to invoke it and get the result.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `filter.function`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/filter/FilterFunctionProperties.java[FilterFunctionProperties.java]
## Examples
== Examples
See this link:src/test/java/org/springframework/cloud/fn/filter/FilterFunctionApplicationTests.java[test suite] for examples of how this function is used.
## Other usage
== Other usage
See this link:../../../applications/processor/filter-processor/README.adoc[README] where this function is used to create a Spring Cloud Stream application.
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.

View File

@@ -1,8 +1,8 @@
# Header Enricher Function
= Header Enricher Function
This module provides a header enricher function that can be reused and composed in other applications.
## Beans for injection
== Beans for injection
The `HeaderEnricherFunctionConfiguration` auto-configuration provides the following bean:
@@ -12,14 +12,14 @@ You can use `headerEnricherFunction` as a qualifier when injecting.
Once injected, you can use the `apply` method of the `Function` to invoke it and get the result.
## Configuration Options
== Configuration Options
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/header/enricher/HeaderEnricherFunctionProperties.java[HeaderEnricherFunctionProperties.java]
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/header/enricher/HeaderEnricherFunctionApplicationTests.java[test suite] for examples of how this function is used.
## Other usage
== Other usage
See this link:../../../applications/processor/header-enricher-processor/README.adoc[README] where this function is used to create a Spring Cloud Stream application.
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.

View File

@@ -22,4 +22,4 @@ See this link:src/test/java/org/springframework/cloud/fn/header/filter/HeaderFil
== Other usage
See this link:../../../applications/processor/header-filter-processor/README.adoc[README] where this function is used to create a Spring Cloud Stream application.
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.

View File

@@ -1,11 +1,11 @@
# HTTP Request Function
= HTTP Request Function
This module provides an HTTP request function that can be reused and composed in other applications.
The `Function` uses the reactive `WebClient` from `Spring WebFlux` and is implemented as a `java.util.function.Function`.
This function gives you a reactive stream of `ResponseEntity` given a stream of request messages as the function a signature of `Function<Message<?>,ResponseEntity>`.
Users have to subscribe to the returned `Flux` to receive the data.
## Beans for injection
== Beans for injection
The `HttpRequestFunction` auto-configuration provides the following bean:
@@ -17,16 +17,16 @@ You can use `httpRequestFunction` as a qualifier when injecting.
Once injected, you can use the `apply` method of the `Function` to invoke it and then subscribe to the returned `Flux`.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `http.request`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/http/request/HttpRequestFunctionProperties.java[HttpRequestFunctionProperties.java]
## Examples
== Examples
See this link:src/test/java/org/springframework/cloud/fn/http/request/HttpRequestFunctionTests.java[test suite] for examples of how this function is used.
## Other usage
== Other usage
See this link:../../../applications/processor/http-request-processor/README.adoc[README] where this function is used to create a Spring Cloud Stream application to process HTTP requests.
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.

View File

@@ -1,9 +1,9 @@
# SpEL Function
= SpEL Function
This module provides a SpEL function that can be reused and composed in other applications.
The function can be used to apply SpEL transformations on data based on a SpEL expression.
## Beans for injection
== Beans for injection
The `SpelFunctionConfiguration` auto-configuration provides the following bean:
@@ -13,16 +13,16 @@ You can use `spelFunction` as a qualifier when injecting.
Once injected, you can use the `apply` method of the `Function` to invoke it and get the result.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `spel`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/spel/SpelFunctionProperties.java[SpelFunctionProperties.java]
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/spel/SpelFunctionApplicationTests.java[test suite] for examples of how this function is used.
## Other usage
== Other usage
See this link:../../../applications/processor/transform-processor/README.adoc[README] where this function is used to create a Spring Cloud Stream transformer application.
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.

View File

@@ -1,8 +1,8 @@
# Splitter Function
= Splitter Function
This module provides a splitter function that can be reused and composed in other applications.
## Beans for injection
== Beans for injection
The `SpliiterFunctionConfiguration` auto-configuration provides the following bean:
@@ -12,14 +12,14 @@ You can use `splitterFunction` as a qualifier when injecting.
Once injected, you can use the `apply` method of the `Function` to invoke it and get the result.
## Configuration Options
== Configuration Options
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/splitter/SplitterFunctionProperties.java[SplitterFunctionProperties.java]
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/splitter/SplitterFunctionApplicationTests.java[test suite] for examples of how this function is used.
## Other usage
== Other usage
See this link:../../../applications/processor/splitter-processor/README.adoc[README] where this function is used to create a Spring Cloud Stream application.
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.

View File

@@ -1,9 +1,9 @@
# Task Launch Request Function
= Task Launch Request Function
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]
that can be used as input to the TaskLauncher function to launch a task.
## Beans for injection
== Beans for injection
The `TaskLaunchRequestFunctionConfiguration` auto-configuration provides the following bean:
@@ -13,10 +13,10 @@ You can use `taskLaunchRequestFunction` as a qualifier when injecting.
Once injected, you can use the `apply` method of the `Function` to invoke it and get the result.
## Configuration Options
== Configuration Options
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]
## Examples
== Examples
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.

View File

@@ -1,4 +1,4 @@
# Twitter Functions
= Twitter Functions
This module provides couple of twitter functions that can be reused and composed in other applications.
@@ -10,7 +10,7 @@ This module exposes auto-configurations for the following beans:
Each of them are conditional by specific configuration properties.
## 1. Twitter Trend Function
== 1. Twitter Trend Function
Function can return either Trends topics or the Locations of the trending topics.
The `twitter.trend.trend-query-type` property allows choosing between both types.
@@ -25,22 +25,22 @@ If the `latitude`, `longitude` parameters are provided the processor performs th
Response is an array of `locations` that encode the location's WOEID and some other human-readable information such as a canonical name and country the location belongs in.
### 1.1 Beans for injection
=== 1.1 Beans for injection
You can use `Function<Message<?>, Message<byte[]>> twitterTrendFunction` as a qualifier when injecting.
Once injected, you can use the `apply` method of the `Function` to invoke it and get the result.
### 1.2 Configuration Options
=== 1.2 Configuration Options
TIP: For `SpEL` expression properties wrap the literal values in single quotes (`'`).
For more information on the various options available, please see link:../twitter-function/src/main/java/org/springframework/cloud/fn/twitter/trend/TwitterTrendFunctionProperties.java[TwitterTrendFunctionProperties.java]
### 1.3 Tests
=== 1.3 Tests
See this link:src/test/java/org/springframework/cloud/fn/twitter/trend/TwitterTrendFunctionTests.java[test suite] for examples of how this function is used.
### 1.4 Other usage
=== 1.4 Other usage
Leveraging the Spring Cloud Function "composability", you can compose the Trend function in your boot app like this:
@@ -56,7 +56,7 @@ public class MyTwitterTrendBootApp {
}
----
## 2. Twitter Geo Function.
== 2. Twitter Geo Function.
Function based on the https://developer.twitter.com/en/docs/geo/places-near-location/overview[Geo API] that retrieves Twitter place information based on query parameters such as (`latitude`, `longitude`) pair, an `IP` address, or a place `name`.
@@ -77,22 +77,22 @@ NOTE: Limits: 15 requests / 15-min window (user auth).
This function auto-configuration is conditional on `twitter.geo.search.ip != null || (twitter.geo.location.lat != null && twitter.geo.location.lon != null)`
### 2.1 Beans for injection
=== 2.1 Beans for injection
You can use `Function<Message<?>, Message<byte[]>> twitterGeoFunction` as a qualifier when injecting.
Once injected, you can use the `apply` method of the `Function` to invoke it and get the result.
### 2.2 Configuration Options
=== 2.2 Configuration Options
TIP: For `SpEL` expression properties wrap the literal values in single quotes (`'`).
For more information on the various options available, please see link:../twitter-function/src/main/java/org/springframework/cloud/fn/twitter/geo/TwitterGeoFunctionProperties.java[TwitterGeoFunctionProperties.java]
### 2.3 Tests
=== 2.3 Tests
See this link:src/test/java/org/springframework/cloud/fn/twitter/geo/TwitterGeoFunctionTests.java[test suite] for examples of how this function is used.
### 2.4 Other usage
=== 2.4 Other usage
Leveraging the Spring Cloud Function composability, you can compose the Geo function in your boot app like this:
@@ -108,7 +108,7 @@ public class MyTwitterGeoProcessorBootApp {
}
----
## 3. Twitter Users Function
== 3. Twitter Users Function
Retrieves users either by list of use ids and/or screen-names (https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-lookup[Users Lookup API]) or by text search query (https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-search[Users Search API]).
Uses SpEL expressions to compute the query parameters from the input message.
@@ -121,19 +121,17 @@ This property is required to trigger the `twitterUsersFunction` auto-configurati
* https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-search[Users Search API] - Relevance-based search interface to public user accounts on Twitter.
Querying by topical interest, full name, company name, location, or other criteria. Exact match searches are not supported. Only the first 1,000 matching results are available. Rate limits:(900 requests / 15-min window)
### 3.1 Beans for injection
=== 3.1 Beans for injection
You can use `Function<Message<?>, Message<byte[]>> twitterUsersFunction` as a qualifier when injecting.
Once injected, you can use the `apply` method of the `Function` to invoke it and get the result.
### 3.2 Configuration Options
=== 3.2 Configuration Options
TIP: For `SpEL` expression properties wrap the literal values in single quotes (`'`).
For more information on the various options available, please see link:../twitter-function/src/main/java/org/springframework/cloud/fn/twitter/users/TwitterUsersFunctionProperties.java[TwitterUsersFunctionProperties.java]
### 3.3 Tests
=== 3.3 Tests
See this link:src/test/java/org/springframework/cloud/fn/twitter/users/TwitterUsersFunctionTests.java[test suite] for examples of how this function is used.
### 3.4 Other usage

View File

@@ -1,4 +1,4 @@
# FTP Supplier
= FTP Supplier
This module provides an FTP supplier that can be reused and composed in other applications.
The `Supplier` uses the `FtpInboundChannelAdapter` from Spring Integration.
@@ -6,7 +6,7 @@ The `Supplier` uses the `FtpInboundChannelAdapter` from Spring Integration.
This supplier gives you a reactive stream of files from the provided directory as the supplier has a signature of `Supplier<Flux<Message<?>>>`.
Users have to subscribe to this `Flux` and receive the data.
## Beans for injection
== Beans for injection
The `FtpSupplierConfiguration` auto-configuration provides the following bean:
@@ -18,7 +18,7 @@ You can use `ftpSupplier` 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
== Configuration Options
All configuration properties are prefixed with `ftp.supplier`.
There are also properties that need to be used with the prefix `file.consumer`.
@@ -28,10 +28,10 @@ See `FileConsumerProperties` also.
A `ComponentCustomizer<FtpInboundChannelAdapterSpec>` bean can be added in the target project to provide any custom options for the `FtpInboundChannelAdapterSpec` configuration used by the `ftpSupplier`.
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/supplier/ftp/FtpSupplierTests.java[test suite] for the various ways, this supplier is used.
## Other usage
== Other usage
See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/ftp-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes a File Source.

View File

@@ -1,4 +1,4 @@
# HTTP Supplier
= 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.
@@ -6,7 +6,7 @@ The `Supplier` uses the `WebFluxInboundEndpoint` from Spring Integration.
This supplier gives you a reactive stream from the http endpoint. The supplier has a signature of `Supplier<Flux<Message<byte[]>>>`.
Users have to subscribe to this `Flux` and then receive the data.
## Beans for injection
== Beans for injection
The `HttpSupplierConfiguration` auto-configuration provides the following bean:
@@ -18,7 +18,7 @@ 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
== Configuration Options
All configuration properties are prefixed with `http.supplier`.
@@ -26,10 +26,10 @@ For more information on the various options available, please see link:src/main/
The `HeaderMapper<HttpHeaders>` bean can be provided in the target configuration to override a default one in the `HttpSupplierConfiguration`.
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/supplier/http/HttpSupplierApplicationTests.java[test suite] for the various ways, this supplier is used.
## Other usage
== 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.

View File

@@ -1,11 +1,11 @@
# JDBC Supplier
= 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
== Beans for injection
The `JdbcSupplierConfiguration` auto-configuration provides the following bean:
@@ -19,7 +19,7 @@ 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
== Configuration Options
All configuration properties are prefixed with `jdbc.supplier`.
@@ -27,10 +27,10 @@ For more information on the various options available, please see link:src/main/
A `ComponentCustomizer<JdbcPollingChannelAdapter>` bean can be added in the target project to provide any custom options for the `JdbcPollingChannelAdapter` configuration used by the `jdbcSupplier`.
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/supplier/jdbc[test suite] for the various ways, this supplier is used.
## Other usage
== 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.

View File

@@ -1,4 +1,4 @@
# JMS Supplier
= JMS Supplier
This module provides a JMS supplier that can be reused and composed in other applications.
The `Supplier` uses the JMS support provided by Spring Framework and Spring Integration under the covers.
@@ -6,7 +6,7 @@ The `Supplier` uses the JMS support provided by Spring Framework and Spring Inte
This supplier gives you a reactive stream from JMS sources. The supplier has a signature of `Supplier<Flux<Message<?>>>`.
Users have to subscribe to this `Flux` and then receive the data.
## Beans for injection
== Beans for injection
The `JmsSupplierConfiguration` auto-configuration provides the following bean:
@@ -18,7 +18,7 @@ You can use `jmsSupplier` 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
== Configuration Options
All configuration properties are prefixed with `jms`.
@@ -26,10 +26,10 @@ For more information on the various options available, please see link:src/main/
A `ComponentCustomizer<JmsMessageDrivenChannelAdapterSpec<?>>` bean can be added in the target project to provide any custom options for the `JmsMessageDrivenChannelAdapterSpec` configuration used by the `jmsSupplier`.
## Examples
== Examples
See this link:src/test/java/org/springframework/cloud/fn/supplier/jms/[test suite] for the various ways, this supplier is used.
## Other usage
== Other usage
See this link:../../../applications/source/jms-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream JMS Source.
See this https://github.com/spring-cloud/stream-applications/blob/main/applications/source/jms-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream JMS Source.

View File

@@ -1,15 +1,15 @@
# Apache Kafka (Consumer) Supplier
= Apache Kafka (Consumer) Supplier
A `Supplier` that allows to consume messages from Apache Kafka topic.
## Beans for injection
== Beans for injection
The `KafkaSupplierConfiguration` is an auto-configuration, so no need to import anything.
The `Supplier<Flux<Message<?>>> kafkaSupplier` bean can be injected into the target service for consuming data from Kafka topics.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `kafka.supplier`.
@@ -18,11 +18,8 @@ Also, this artifact fully depends on Spring for Apache Kafka auto-configuration
A `ComponentCustomizer<KafkaMessageDrivenChannelAdapterSpec<?, ?, ?>>` bean can be added in the target project to provide any custom options for the `KafkaMessageDrivenChannelAdapterSpec` configuration used by the `kafkaSupplier`.
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].
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].
## Tests
## Other usage
== Other usage
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.

View File

@@ -1,4 +1,4 @@
# Mail Supplier
= Mail Supplier
This module provides a File supplier that can be reused and composed in other applications.
The `Supplier` uses the mail IMAP and POP3 support from Spring Integration.
@@ -7,7 +7,7 @@ This supplier gives you a reactive stream of emails from the provided url (imap
The supplier has a signature of `Supplier<Flux<Message<?>>>`.
Users have to subscribe to this `Flux` and receive the data.
## Beans for injection
== Beans for injection
The `MailSupplierConfiguration` auto-configuration provides the following bean:
@@ -19,7 +19,7 @@ You can use `mailSupplier` 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
== Configuration Options
All configuration properties are prefixed with `mail.supplier`.
@@ -27,10 +27,10 @@ For more information on the various options available, please see link:src/main/
A `ComponentCustomizer<MailInboundChannelAdapterSpec<?, ?>>` (or `ComponentCustomizer<ImapIdleChannelAdapterSpec>` when `mail.supplier.idle-imap = true`) bean can be added in the target project to provide any custom options for the `MailInboundChannelAdapterSpec` (or `ImapIdleChannelAdapterSpec`, respectively) configuration used by the `mailSupplier`.
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/supplier/mail[test suite] for the various ways, this supplier is used.
## Other usage
== Other usage
See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/mail-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes a Mail Source.

View File

@@ -1,11 +1,11 @@
# MongoDB Supplier
= 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
== Beans for injection
The `MongoDBSupplierConfiguration` auto-configuration provides the following bean:
@@ -19,7 +19,7 @@ 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
== Configuration Options
All configuration properties are prefixed with `mongodb.supplier`.
@@ -30,10 +30,10 @@ The `updateExpression` is optional and ca use an item from query result as a roo
A `ComponentCustomizer<MongoDbMessageSource>` bean can be added in the target project to provide any custom options for the `MongoDbMessageSource` configuration used by the `mongodbSupplier`.
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/supplier/mongo/MongodbSupplierApplicationTests.java[test suite] for the various ways, this supplier is used.
## Other usage
== 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.

View File

@@ -1,4 +1,4 @@
# MQTT Supplier
= 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.
@@ -6,7 +6,7 @@ The `Supplier` uses the `MqttPahoMessageDrivenChannelAdapter` from Spring Integr
This supplier gives you a reactive stream from MQTT sources. The supplier has a signature of `Supplier<Flux<Message<?>>>`.
Users have to subscribe to this `Flux` and then receive the data.
## Beans for injection
== Beans for injection
The `MqttSupplierConfiguration` auto-configuration provides the following bean:
@@ -18,7 +18,7 @@ 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
== Configuration Options
All configuration properties are prefixed with `mqtt.supplier` and `mqtt`.
@@ -26,17 +26,17 @@ For more information on the various options available, please see link:src/main/
A `ComponentCustomizer<MqttPahoMessageDrivenChannelAdapter>` bean can be added in the target project to provide any custom options for the `MqttPahoMessageDrivenChannelAdapter` configuration used by the `mqttSupplier`.
## SSL Configuration
== SSL Configuration
The MQTT Paho client can accept an SSL configuration via `MqttConnectOptions.setSSLProperties()`.
These properties are exposed on the `MqttProperties.sslProperties` map.
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.
## Tests
== Tests
See this link: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 link:../../common/mqtt-common/src/main/java/org/springframework/cloud/fn/common/mqtt/MqttProperties.java[this set of properties] to consider.
## Other usage
== 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.

View File

@@ -1,4 +1,4 @@
# RabbitMQ Supplier
= RabbitMQ Supplier
This module provides an RabbitMQ supplier that can be reused and composed in other applications.
The `Supplier` uses the RabbitMQ support provided by Spring Integration.
@@ -6,7 +6,7 @@ The `rabbitSupplier` is implemented as a `java.util.function.Supplier`.
This supplier gives you a reactive stream of files from the provided directory as the supplier has a signature of `Supplier<Flux<Message<?>>>`.
Users have to subscribe to this `Flux` and receive the data.
## Beans for injection
== Beans for injection
The `RabbitSupplierConfiguration` auto-configuration provides the following bean:
@@ -18,7 +18,7 @@ You can use `rabbitSupplier` 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
== Configuration Options
All configuration properties are prefixed with `rabbit.supplier`.
@@ -27,8 +27,6 @@ Also see an auto-configuration for RabbitMQ connection and listener container op
A `ComponentCustomizer<AmqpInboundChannelAdapterSMLCSpec>` bean can be added in the target project to provide any custom options for the `AmqpInboundChannelAdapterSMLCSpec` configuration used by the `rabbitSupplier`.
## Tests
## Other usage
== Other usage
See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/rabbit-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes a RabbitMQ Source.

View File

@@ -23,9 +23,7 @@ Once injected, you can use the `get` method of the `Supplier` to invoke it and t
All configuration properties are prefixed with `s3.supplier`.
There are also properties that need to be used with the prefix `s3.common` and `file.consumer`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/supplier/s3/AwsS3SupplierProperties.java[AwsS3SupplierProperties],
link:../../common/file-common/src/main/java/org/springframework/cloud/fn/common/file/FileConsumerProperties.java[FileConsumerProperties], and
`io.awspring.cloud.autoconfigure.s3.properties.S3Properties` from Spring Cloud AWS auto-configuration..
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/supplier/s3/AwsS3SupplierProperties.java[AwsS3SupplierProperties], link:../../common/file-common/src/main/java/org/springframework/cloud/fn/common/file/FileConsumerProperties.java[FileConsumerProperties], and `io.awspring.cloud.autoconfigure.s3.properties.S3Properties` from Spring Cloud AWS auto-configuration.
A `ComponentCustomizer<S3InboundFileSynchronizingMessageSource>` bean can be added in the target project to provide any custom options for the `S3InboundFileSynchronizingMessageSource` configuration used by the `s3Supplier`.
@@ -35,4 +33,4 @@ See this link:src/test/java/org/springframework/cloud/fn/supplier/s3[test suite]
== Other usage
See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/s3-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes an AWS S3 Source.
See this https://github.com/spring-cloud/stream-applications/blob/main/applications/source/s3-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes an AWS S3 Source.

View File

@@ -1,4 +1,4 @@
# SFTP Supplier
= SFTP Supplier
This module provides a SFTP supplier that can be reused and composed in other applications.
The `Supplier` uses various `Sftp` inbound adapters from Spring Integration to support a range of modes to consume data from an SFTP server.
@@ -23,20 +23,21 @@ When not explicitly set, the option defaults to `false`.
When configuring the `sftp.factory.known-hosts-expression` option, the root object of the evaluation is the application context, an example might be `sftp.factory.known-hosts-expression = @systemProperties['user.home'] + '/.ssh/known_hosts'`.
## Idempotency
== Idempotency
By default, the supplier uses a https://docs.spring.io/spring-integration/api/org/springframework/integration/metadata/SimpleMetadataStore.html[SimpleMetadataStore], storing the last modified time to track files that have already been processed in memory.
If an application using this supplier is restarted, any existing files will be reprocessed. You can inject on of the persistent https://docs.spring.io/spring-integration/reference/html/meta-data-store.html[MetadataStore implementations] provided by Spring Integration, or your own of course, to maintain this state permanently.
See also link:../../common/metadata-store-common/README.adoc[`MetadataStore`] options for possible shared persistent store configuration for the `SftpPersistentAcceptOnceFileListFilter` used in the SFTP Source.
If an application using this supplier is restarted, any existing files will be reprocessed. You can inject on of the persistent https://docs.spring.io/spring-integration/reference/meta-data-store.html[MetadataStore implementations] provided by Spring Integration, or your own of course, to maintain this state permanently.
See also link:../../common/spring-metadata-store-common/README.adoc[`MetadataStore`] options for possible shared persistent store configuration for the `SftpPersistentAcceptOnceFileListFilter` used in the SFTP Source.
## Multiple SFTP Servers
== Multiple SFTP Servers
This source supports consuming from multiple SFTP servers.
This requires configuring an SFTP Session Factory for each server.
The labels `one` and `two` shown below can be replaced by any names you want.
The following configuration will rotate between two SFTP servers (this can also be used for multiple directories on the same server), consuming files in a round-robin fashion:
```
[source,properties]
----
sftp.supplier.factories.one.host=host1
sftp.supplier.factories.one.port=1234,
sftp.supplier.factories.one.username = user1,
@@ -49,8 +50,7 @@ sftp.supplier.factories.two.password = pass2,
sftp.supplier.directories=one.sftpSource,two.sftpSecondSource,
sftp.supplier.max-fetch=1,
sftp.supplier.fair=true
```
---
----
@@ -58,7 +58,7 @@ sftp.supplier.fair=true
This supplier gives you a reactive stream of objects from the provided directory(ies) as the supplier has a signature of `Supplier<Flux<Message<?>>>`.
Users have to subscribe to this `Flux` and receive the data.
## Beans for injection
== Beans for injection
The `SftpSupplierConfiguration` auto-configuration provides the following bean:
@@ -70,7 +70,7 @@ You can use `sftpSupplier` 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
== Configuration Options
All configuration properties are prefixed with `sftp.supplier`.
There are also properties that need to be used with the prefix `file.consumer`.
@@ -78,10 +78,10 @@ There are also properties that need to be used with the prefix `file.consumer`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/supplier/sftp/SftpSupplierProperties.java[SftpSupplierProperties].
Also see `FileConsumerProperties`.
## Examples
== Examples
See this link:src/test/java/org/springframework/cloud/fn/supplier/sftp/SftpSupplierApplicationTests.java[test suite] for the various ways, this supplier is used.
## Other usage
== Other usage
See this link:../../../applications/source/sftp-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application that provides an Sftp Source.
See this https://github.com/spring-cloud/stream-applications/blob/main/applications/source/sftp-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application that provides an Sftp Source.

View File

@@ -1,11 +1,11 @@
# Syslog Supplier
= Syslog Supplier
Syslog supplier that produces both TCP and UDP based syslog events.
The `Supplier` uses the `TcpSyslogReceivingChannelAdapter` and `UdpSyslogReceivingChannelAdapter` from Spring Integration.
This supplier gives you a reactive stream of messages and the supplier has a signature of `Supplier<Flux<Message<?>>>`.
Users have to subscribe to this `Flux` and receive the data.
## Beans for injection
== Beans for injection
The `SyslogSupplierConfiguration` provides the following bean:
@@ -17,16 +17,16 @@ You can use `syslogSupplier` 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
== Configuration Options
All configuration properties are prefixed with `syslog.supplier`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/supplier/syslog/SyslogSupplierProperties.java[SyslogSupplierProperties].
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/supplier/syslog[test suite] for the various ways, this supplier is used.
## Other usage
== Other usage
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.

View File

@@ -1,4 +1,4 @@
# TCP Supplier
= 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.
@@ -7,7 +7,7 @@ This supplier gives you a reactive stream from TCP sources.
The supplier has a signature of `Supplier<Flux<Message<?>>>`.
Users have to subscribe to this `Flux` and then receive the data.
## Beans for injection
== Beans for injection
The `TcpSupplierConfiguration` auto-configuration provides the following bean: `tcpSupplier`.
@@ -17,17 +17,17 @@ 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
== Configuration Options
All configuration properties are prefixed with `tcp.supplier` and `tcp`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/supplier/tcp/TcpSupplierProperties.java[TcpSupplierProperties].
In addition to this, there is also link:../../common/tcp-common/src/main/java/org/springframework/cloud/fn/common/tcp/TcpConnectionFactoryProperties.java[this set of properties] to consider.
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/supplier/tcp[test suite] for the various ways, this supplier is used.
## Other usage
== 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.

View File

@@ -1,10 +1,10 @@
# Time Supplier
= 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
== Beans for injection
The `TimeSupplierConfiguration` auto-configuration provides the following bean:
@@ -16,16 +16,16 @@ 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
== Configuration Options
All configuration properties are prefixed with `time`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/supplier/time/TimeSupplierProperties.java[TimeSupplierProperties].
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/supplier/time[test suite] for the various ways, this supplier is used.
## Other usage
== 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.

View File

@@ -1,11 +1,11 @@
# Twitter Suppliers
= Twitter Suppliers
This module provides a Twitter Status, Message, Friendship suppliers that can be reused and composed in various applications.
`java.util.function.Supplier`
## 1. Twitter Status Search
== 1. Twitter Status Search
The Twitter's https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets.html[Standard search API] (search/tweets) allows simple queries against the indices of recent or popular Tweets. This `Source` provides continuous searches against a sampling of recent Tweets published in the past 7 days. Part of the 'public' set of APIs.
@@ -13,7 +13,7 @@ Returns a collection of relevant Tweets matching a specified query.
To enable this supplier, the `twitter.search.enabled` must be set to `true`.
### 1.1 Beans for injection
=== 1.1 Beans for injection
The `TwitterSearchSupplierConfiguration` auto-configuration provides the following bean:
@@ -25,7 +25,7 @@ You can use `twitterSearchSupplier` as a qualifier when injecting.
Once injected, you can use the `get` method of the `Supplier` to invoke it.
### 1.2 Configuration Options
=== 1.2 Configuration Options
The configuration properties prefixed with `twitter.search`.
There are also properties that need to be used with the prefix `twitter.connection`.
@@ -35,11 +35,11 @@ The `spring.integration.poller` properties control the interval between consecut
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/supplier/twitter/status/search/TwitterSearchSupplierProperties.java[TwitterSearchSupplierProperties].
See `TwitterConnectionProperties` also.
### 1.3 Other usage
=== 1.3 Other usage
See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/twitter-search-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes a Twitter Search Source.
## 2. Twitter Status Real-time Retrieval
== 2. Twitter Status Real-time Retrieval
Provides real-time, Tweet streaming based on the https://developer.twitter.com/en/docs/tweets/filter-realtime/api-reference/post-statuses-filter.html[Filter] and https://developer.twitter.com/en/docs/tweets/sample-realtime/overview/GET_statuse_sample[Sample] APIs.
The `Filter API` flavor returns public statuses that match one or more filter predicates.
@@ -52,7 +52,7 @@ The default access level allows up to 400 track keywords, 5,000 follow user Ids
To enable this supplier, the `twitter.stream.enabled` must be set to `true`.
### 2.1 Beans for injection
=== 2.1 Beans for injection
The `TwitterStreamSupplierConfiguration` auto-configuration provides the following bean:
@@ -64,7 +64,7 @@ You can use `twitterStreamSupplier` 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`.
### 2.2 Configuration Options
=== 2.2 Configuration Options
All configuration properties are prefixed with `twitter.stream`.
There are also properties that need to be used with the prefix `twitter.connection`.
@@ -73,11 +73,11 @@ For more information on the various options available, please see link:src/main/
See `TwitterConnectionProperties` also.
### 2.3 Other usage
=== 2.3 Other usage
See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/twitter-stream-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes a Twitter Stream Source.
## 3. Twitter Direct Message Supplier
== 3. Twitter Direct Message Supplier
To enable this supplier, the `twitter.message.source.enabled` must be set to `true`.
@@ -90,7 +90,7 @@ The `twitter.message.source.count` controls the number or returned messages.
The `spring.integration.poller` properties control the message poll interval.
Must be aligned with used APIs rate limit
### 3.1 Beans for injection
=== 3.1 Beans for injection
The `TwitterMessageSupplierConfiguration` auto-configuration provides the following bean:
@@ -102,7 +102,7 @@ You can use `twitterMessageSupplier` as a qualifier when injecting.
Once injected, you can use the `get` method of the `Supplier` to invoke it.
### 3.2 Configuration Options
=== 3.2 Configuration Options
The configuration properties prefixed with `twitter.search`.
There are also properties that need to be used with the prefix `twitter.connection`.
@@ -112,11 +112,11 @@ The `spring.integration.poller` properties control the interval between consecut
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/supplier/twitter/message/TwitterMessageSupplierProperties.java[TwitterMessageSupplierProperties].
See `TwitterConnectionProperties` also.
### 3.3 Other usage
=== 3.3 Other usage
See this https://github.com/spring-cloud/stream-applications/blob/master/applications/source/twitter-message-source/README.adoc[README] where this supplier is used to create a Spring Cloud Stream application where it makes a Twitter Message Source.
## 4. Twitter Friendships Supplier
== 4. Twitter Friendships Supplier
To enable this supplier, the `twitter.friendships.source.enabled` must be set to `true`.
@@ -126,7 +126,7 @@ The `twitter.friendships.source.type` property allow to select between both type
TIP: Rate limit: 15 requests per 30-min window. ~ 1 req/ 2 min
### 4.1 Beans for injection
=== 4.1 Beans for injection
The `TwitterFriendshipsSupplierConfiguration` auto-configuration provides the following beans:
@@ -140,7 +140,7 @@ Both suppliers expose `Supplier<List<User>>`.
encoded as JSON `Message` payloads. You need to inject this as `Supplier<Message<byte[]>>`.
### 4.2 Configuration Options
=== 4.2 Configuration Options
The configuration properties prefixed with `twitter.friendships.source`.
There are also properties that need to be used with the prefix `twitter.connection`.

View File

@@ -1,11 +1,11 @@
# Websocket Supplier
= Websocket Supplier
A basic websocket supplier that produced messages through web socket.
The `Supplier` uses the `WebsocketInboundChannelAdapter` from Spring Integration.
This supplier gives you a reactive stream of messages and the supplier has a signature of `Supplier<Flux<Message<?>>>`.
Users have to subscribe to this `Flux` and receive the data.
## Beans for injection
== Beans for injection
The `WebsocketSupplierConfiguration` auto-configuration provides the following bean:
@@ -17,16 +17,16 @@ You can use `websocketSupplier` 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
== Configuration Options
All configuration properties are prefixed with `websocket.supplier`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/supplier/websocket/WebsocketSupplierProperties.java[WebsocketSupplierProperties].
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/supplier/websocket/WebsocketSupplierTests.java[test suite] for the various ways, this supplier is used.
## Other usage
== Other usage
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.

View File

@@ -1,8 +1,8 @@
# XMPP Supplier
= XMPP Supplier
A supplier that allows you to receive messages through a XMPP server.
## Beans for injection
== Beans for injection
You can import the `XmppSupplierConfiguration` in the application and then inject the following bean.
@@ -15,16 +15,16 @@ You can use `xmppSupplier` as a qualifier when injecting.
**NOTE:** This is a functional endpoint. One will need to subscribe to this endpoint in order to start accepting data
on it.
## Configuration Options
== Configuration Options
All configuration properties are prefixed with `xmpp.supplier`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/consumer/xmpp/XmppSupplierProperties.java[XmppSupplierProperties].
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/supplier/xmpp/XmppSupplierProperties.java[XmppSupplierProperties].
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/consumer/xmpp/[test suite] for the various ways, this supplier is used.
See this link:src/test/java/org/springframework/cloud/fn/supplier/xmpp/[test suite] for the various ways, this supplier is used.
## Other usage
== Other usage
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.

View File

@@ -1,11 +1,11 @@
# ZeroMQ Supplier
= ZeroMQ Supplier
A basic ZeroMQ supplier that produced messages through TCP connection.
The `Supplier` uses the `ZeroMqMessageProducer` from Spring Integration.
This supplier gives you a reactive stream of messages and the supplier has a signature of `Supplier<Flux<Message<?>>>`.
Users have to subscribe to this `Flux` and receive the data.
## Beans for injection
== Beans for injection
You can import the `ZeroMqSupplierConfiguration` in the application and then inject the following bean.
@@ -17,16 +17,16 @@ You can use `zeromqSupplier` 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
== Configuration Options
All configuration properties are prefixed with `zeromq.supplier`.
For more information on the various options available, please see link:src/main/java/org/springframework/cloud/fn/supplier/zeromq/ZeroMqSupplierProperties.java[ZeroMqSupplierProperties].
## Tests
== Tests
See this link:src/test/java/org/springframework/cloud/fn/supplier/zeromq/ZeroMqSupplierTests.java[test suite] for the various ways, this supplier is used.
See this link:src/test/java/org/springframework/cloud/fn/supplier/zeromq/ZeroMqSupplierConfigurationTests.java[test suite] for the various ways, this supplier is used.
## Other usage
== Other usage
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.