From 24809557fb708d6671d59998835e154872d913dd Mon Sep 17 00:00:00 2001 From: Gary Russell Date: Tue, 20 Feb 2018 14:22:24 -0500 Subject: [PATCH] INT-4408: PollerSpec Doc Polishing JIRA: https://jira.spring.io/browse/INT-4408 --- src/reference/asciidoc/dsl.adoc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/reference/asciidoc/dsl.adoc b/src/reference/asciidoc/dsl.adoc index dc1f96cd08..10943360b8 100644 --- a/src/reference/asciidoc/dsl.adoc +++ b/src/reference/asciidoc/dsl.adoc @@ -206,13 +206,16 @@ The `Pollers` builder factory can be used to configure common bean definitions o [source,java] ---- @Bean(name = PollerMetadata.DEFAULT_POLLER) -public PollerMetadata poller() { - return Pollers.fixedRate(500).get(); +public PollerSpec poller() { + return Pollers.fixedRate(500) + .errorChannel("myErrors"); } ---- See `Pollers` and `PollerSpec` Java Docs for more information. +IMPORTANT: If you use the DSL to construct a `PollerSpec` as a `@Bean`, do not call the `get()` method in the bean definition; the `PollerSpec` is a `FactoryBean` that will generate the `PollerMetadata` object from the specification and initialize all of its properties as needed. + [[java-dsl-endpoints]] === DSL and Endpoint Configuration