From a0ca3f57c15eb5f710e4f836b4222f37e7c6f9f3 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Mon, 8 Jun 2020 18:34:45 +0200 Subject: [PATCH] Migrated to new documentation generation --- README.adoc | 59 ++++++++++++------------ docs/pom.xml | 26 ++++++----- docs/src/main/asciidoc/_configprops.adoc | 30 ++++++++++++ 3 files changed, 74 insertions(+), 41 deletions(-) create mode 100644 docs/src/main/asciidoc/_configprops.adoc diff --git a/README.adoc b/README.adoc index 1ba96cf50..7844f3277 100644 --- a/README.adoc +++ b/README.adoc @@ -4,6 +4,7 @@ Manual changes to this file will be lost when it is generated again. Edit the files in the src/main/asciidoc/ directory instead. //// + :jdkversion: 1.8 :github-tag: master :github-repo: spring-cloud/spring-cloud-stream @@ -108,29 +109,29 @@ Modify the `com.example.loggingconsumer.LoggingConsumerApplication` class to loo @SpringBootApplication public class LoggingConsumerApplication { - public static void main(String[] args) { - SpringApplication.run(LoggingConsumerApplication.class, args); - } + public static void main(String[] args) { + SpringApplication.run(LoggingConsumerApplication.class, args); + } - @Bean - public Consumer log() { - return person -> { - System.out.println("Received: " + person); - }; - } + @Bean + public Consumer log() { + return person -> { + System.out.println("Received: " + person); + }; + } - public static class Person { - private String name; - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - public String toString() { - return this.name; - } - } + public static class Person { + private String name; + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String toString() { + return this.name; + } + } } ---- @@ -149,13 +150,13 @@ You should see following output: [source] ---- - --- [ main] c.s.b.r.p.RabbitExchangeQueueProvisioner : declaring queue for inbound: input.anonymous.CbMIwdkJSBO1ZoPDOtHtCg, bound to: input - --- [ main] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672] - --- [ main] o.s.a.r.c.CachingConnectionFactory : Created new connection: rabbitConnectionFactory#2a3a299:0/SimpleConnection@66c83fc8. . . - . . . - --- [ main] o.s.i.a.i.AmqpInboundChannelAdapter : started inbound.input.anonymous.CbMIwdkJSBO1ZoPDOtHtCg - . . . - --- [ main] c.e.l.LoggingConsumerApplication : Started LoggingConsumerApplication in 2.531 seconds (JVM running for 2.897) + --- [ main] c.s.b.r.p.RabbitExchangeQueueProvisioner : declaring queue for inbound: input.anonymous.CbMIwdkJSBO1ZoPDOtHtCg, bound to: input + --- [ main] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672] + --- [ main] o.s.a.r.c.CachingConnectionFactory : Created new connection: rabbitConnectionFactory#2a3a299:0/SimpleConnection@66c83fc8. . . + . . . + --- [ main] o.s.i.a.i.AmqpInboundChannelAdapter : started inbound.input.anonymous.CbMIwdkJSBO1ZoPDOtHtCg + . . . + --- [ main] c.e.l.LoggingConsumerApplication : Started LoggingConsumerApplication in 2.531 seconds (JVM running for 2.897) ---- Go to the RabbitMQ management console or any other RabbitMQ client and send a message to `input.anonymous.CbMIwdkJSBO1ZoPDOtHtCg`. @@ -330,4 +331,4 @@ added after the original pull request but before a merge. message (where XXXX is the issue number). -// ====================================================================================== \ No newline at end of file +// ====================================================================================== diff --git a/docs/pom.xml b/docs/pom.xml index c541c2d52..7d08b54e8 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -16,8 +16,17 @@ spring-cloud-stream ${basedir}/.. 3.4 + .*stream.* + deploy + + + ${project.groupId} + spring-cloud-stream + + + src/main/asciidoc org.apache.maven.plugins @@ -38,31 +47,24 @@ git-commit-id-plugin - org.apache.maven.plugins maven-dependency-plugin - org.apache.maven.plugins maven-resources-plugin + + org.codehaus.mojo + exec-maven-plugin + org.asciidoctor asciidoctor-maven-plugin - ${asciidoctor-maven-plugin.version} - - ${project.build.directory}/refdocs/ - - ${project.version} - - - org.apache.maven.plugins maven-antrun-plugin - org.codehaus.mojo - build-helper-maven-plugin + maven-deploy-plugin diff --git a/docs/src/main/asciidoc/_configprops.adoc b/docs/src/main/asciidoc/_configprops.adoc new file mode 100644 index 000000000..b21e4c8a0 --- /dev/null +++ b/docs/src/main/asciidoc/_configprops.adoc @@ -0,0 +1,30 @@ +|=== +|Name | Default | Description + +|spring.cloud.stream.binders | | Additional per-binder properties (see {@link BinderProperties}) if more then one binder of the same type is used (i.e., connect to multiple instances of RabbitMq). Here you can specify multiple binder configurations, each with different environment settings. For example; spring.cloud.stream.binders.rabbit1.environment. . . , spring.cloud.stream.binders.rabbit2.environment. . . +|spring.cloud.stream.binding-retry-interval | 30 | Retry interval (in seconds) used to schedule binding attempts. Default: 30 sec. +|spring.cloud.stream.bindings | | Additional binding properties (see {@link BinderProperties}) per binding name (e.g., 'input`). For example; This sets the content-type for the 'input' binding of a Sink application: 'spring.cloud.stream.bindings.input.contentType=text/plain' +|spring.cloud.stream.default-binder | | The name of the binder to use by all bindings in the event multiple binders available (e.g., 'rabbit'). +|spring.cloud.stream.dynamic-destination-cache-size | 10 | The maximum size of Least Recently Used (LRU) cache of dynamic destinations. Once this size is reached, new destinations will trigger the removal of old destinations. Default: 10 +|spring.cloud.stream.dynamic-destinations | [] | A list of destinations that can be bound dynamically. If set, only listed destinations can be bound. +|spring.cloud.stream.function.batch-mode | false | +|spring.cloud.stream.function.bindings | | +|spring.cloud.stream.function.definition | | Definition of functions to bind. If several functions need to be composed into one, use pipes (e.g., 'fooFunc\|barFunc') +|spring.cloud.stream.instance-count | 1 | The number of deployed instances of an application. Default: 1. NOTE: Could also be managed per individual binding "spring.cloud.stream.bindings.foo.consumer.instance-count" where 'foo' is the name of the binding. +|spring.cloud.stream.instance-index | 0 | The instance id of the application: a number from 0 to instanceCount-1. Used for partitioning and with Kafka. NOTE: Could also be managed per individual binding "spring.cloud.stream.bindings.foo.consumer.instance-index" where 'foo' is the name of the binding. +|spring.cloud.stream.instance-index-list | | A list of instance id's from 0 to instanceCount-1. Used for partitioning and with Kafka. NOTE: Could also be managed per individual binding "spring.cloud.stream.bindings.foo.consumer.instance-index-list" where 'foo' is the name of the binding. This setting will override the one set in 'spring.cloud.stream.instance-index' +|spring.cloud.stream.integration.message-handler-not-propagated-headers | | Message header names that will NOT be copied from the inbound message. +|spring.cloud.stream.metrics.export-properties | | List of properties that are going to be appended to each message. This gets populate by onApplicationEvent, once the context refreshes to avoid overhead of doing per message basis. +|spring.cloud.stream.metrics.key | | The name of the metric being emitted. Should be an unique value per application. Defaults to: ${spring.application.name:${vcap.application.name:${spring.config.name:application}}}. +|spring.cloud.stream.metrics.meter-filter | | Pattern to control the 'meters' one wants to capture. By default all 'meters' will be captured. For example, 'spring.integration.*' will only capture metric information for meters whose name starts with 'spring.integration'. +|spring.cloud.stream.metrics.properties | | Application properties that should be added to the metrics payload For example: `spring.application**`. +|spring.cloud.stream.metrics.schedule-interval | 60s | Interval expressed as Duration for scheduling metrics snapshots publishing. Defaults to 60 seconds +|spring.cloud.stream.override-cloud-connectors | false | This property is only applicable when the cloud profile is active and Spring Cloud Connectors are provided with the application. If the property is false (the default), the binder detects a suitable bound service (for example, a RabbitMQ service bound in Cloud Foundry for the RabbitMQ binder) and uses it for creating connections (usually through Spring Cloud Connectors). When set to true, this property instructs binders to completely ignore the bound services and rely on Spring Boot properties (for example, relying on the spring.rabbitmq.* properties provided in the environment for the RabbitMQ binder). The typical usage of this property is to be nested in a customized environment when connecting to multiple systems. +|spring.cloud.stream.poller.cron | | Cron expression value for the Cron Trigger. +|spring.cloud.stream.poller.fixed-delay | 1000 | Fixed delay for default poller. +|spring.cloud.stream.poller.initial-delay | 0 | Initial delay for periodic triggers. +|spring.cloud.stream.poller.max-messages-per-poll | 1 | Maximum messages per poll for the default poller. +|spring.cloud.stream.sendto.destination | none | The name of the header used to determine the name of the output destination +|spring.cloud.stream.source | | A colon delimited string representing the names of the sources based on which source bindings will be created. This is primarily to support cases where source binding may be required without providing a corresponding Supplier. (e.g., for cases where the actual source of data is outside of scope of spring-cloud-stream - HTTP -> Stream) + +|=== \ No newline at end of file