From d5bfddc7fc0c3144f7474acff064201cf4e2d51b Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Wed, 24 Jan 2018 09:58:25 -0500 Subject: [PATCH] polishing Resolves #1190 --- .../main/asciidoc/spring-cloud-stream-overview.adoc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spring-cloud-stream-core-docs/src/main/asciidoc/spring-cloud-stream-overview.adoc b/spring-cloud-stream-core-docs/src/main/asciidoc/spring-cloud-stream-overview.adoc index d1cc960cd..da07ea7ab 100644 --- a/spring-cloud-stream-core-docs/src/main/asciidoc/spring-cloud-stream-overview.adoc +++ b/spring-cloud-stream-core-docs/src/main/asciidoc/spring-cloud-stream-overview.adoc @@ -594,10 +594,10 @@ For example, given... public interface PolledConsumer { @Input - PollableMessageSource dest1In(); + PollableMessageSource destIn(); @Output - MessageChannel dest2Out(); + MessageChannel destOut(); } ---- @@ -607,19 +607,19 @@ public interface PolledConsumer { [source,java] ---- @Bean -public ApplicationRunner poller(PollableMessageSource dest1In, MessageChannel dest2Out) { +public ApplicationRunner poller(PollableMessageSource destIn, MessageChannel destOut) { return args -> { while (someCondition()) { try { - if (!dest1In.poll(m -> { + if (!destIn.poll(m -> { String newPayload = ((String) m.getPayload()).toUpperCase(); - dest2Out.send(new GenericMessage<>(newPayload)); + destOut.send(new GenericMessage<>(newPayload)); })) { Thread.sleep(1000); } } catch (Exception e) { - // handle failure + // handle failure (throw an exception to reject the message); } } };