From 17e21cc456fca0cb49818272bd9914b0b0e02888 Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Wed, 16 Mar 2022 15:00:33 +0100 Subject: [PATCH] GH-2280 Updated polling documentation Resolves #2280 --- .../src/main/asciidoc/spring-cloud-stream.adoc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/core/docs/src/main/asciidoc/spring-cloud-stream.adoc b/core/docs/src/main/asciidoc/spring-cloud-stream.adoc index 3ef5f2ca4..2286248d7 100644 --- a/core/docs/src/main/asciidoc/spring-cloud-stream.adoc +++ b/core/docs/src/main/asciidoc/spring-cloud-stream.adoc @@ -574,7 +574,8 @@ so this limitation can only be addressed by either making your consumer reactive ====== Polling Configuration Properties -The following properties are exposed (although deprecated since version 3.2) by Spring Cloud Stream and are prefixed with the `spring.cloud.stream.poller`: +The following properties are exposed by Spring Cloud Stream and are prefixed with the `spring.integration.poller.`: + fixedDelay:: Fixed delay for default poller in milliseconds. @@ -601,10 +602,15 @@ The TimeUnit to apply to delay values. + Default: MILLISECONDS. -For example `--spring.cloud.stream.poller.fixed-delay=2000` sets the poller interval to poll every two seconds. +For example `--spring.integration.poller.fixed-delay=2000` sets the poller interval to poll every two seconds. -IMPORTANT: These poller properties are deprecated starting version 3.2 in favor of similar configuration properties from Spring Boot auto-configuration for Spring Integration. -See `org.springframework.boot.autoconfigure.integration.IntegrationProperties.Poller` for more information. +====== Per-binding polling configuration + +The previous section shows how to configure a single default poller that will be applied to all bindings. While it fits well with the model of microservices spring-cloud-stream designed for where each microservice represents a single component (e.g., Supplier) and thus default poller configuration is enough, there are edge cases where +you may have several components that require different polling configurations + +For such cases please use per-binding way of configuring poller. For example, assume you have an output binding `supply-out-0`. In this case you can configure poller for such +binding using `spring.cloud.stream.bindings.supply-out-0.producer.poller..` prefix (e.g., `spring.cloud.stream.bindings.supply-out-0.producer.poller.fixed-delay=2000`). ===== Sending arbitrary data to an output (e.g. Foreign event-driven sources)