From 4936cba75b821a55c1452541c22ebb3356cce7ca Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Tue, 28 Mar 2023 08:59:11 +0200 Subject: [PATCH] GH-2663 Remove references to deprecated property Resolves #2663 --- docs/src/main/asciidoc/spring-cloud-stream.adoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/src/main/asciidoc/spring-cloud-stream.adoc b/docs/src/main/asciidoc/spring-cloud-stream.adoc index f09d725d8..f6e293e5b 100644 --- a/docs/src/main/asciidoc/spring-cloud-stream.adoc +++ b/docs/src/main/asciidoc/spring-cloud-stream.adoc @@ -626,7 +626,7 @@ delegating incoming requests to stream via StreamBridge mechanism. public class WebSourceApplication { public static void main(String[] args) { - SpringApplication.run(WebSourceApplication.class, "--spring.cloud.stream.source=toStream"); + SpringApplication.run(WebSourceApplication.class, "--spring.cloud.stream.output-bindings=toStream"); } @Autowired @@ -647,11 +647,11 @@ source functions defined (e.g., Supplier bean) leaving the framework with no tri destination auto-provisioning if necessary) for non existing bindings on the first call to its `send(..)` operation caching it for subsequent reuse (see <> for more details). -However, if you want to pre-create an output binding at the initialization (startup) time you can benefit from `spring.cloud.stream.source` property where you can declare the name of your sources. +However, if you want to pre-create an output binding at the initialization (startup) time you can benefit from `spring.cloud.stream.output-bindings` property where you can declare the name of your sources. The provided name will be used as a trigger to create a source binding. So in the preceding example the name of the output binding will be `toStream-out-0` which is consistent with the binding naming convention used by functions (see <>). You can use `;` to signify multiple sources (multiple output bindings) -(e.g., `--spring.cloud.stream.source=foo;bar`) +(e.g., `--spring.cloud.stream.output-bindings=foo;bar`) Also, note that `streamBridge.send(..)` method takes an `Object` for data. This means you can send POJO or `Message` to it and it will go through the same routine when sending output as if it was from any Function or Supplier providing the same level @@ -687,7 +687,7 @@ public class WebSourceApplication { ---- As you can see the preceding example is very similar to the previous one with the exception of explicit binding instruction provided via -`spring.cloud.stream.source` property (which is not provided). +`spring.cloud.stream.output-bindings` property (which is not provided). Here we're sending data to `myDestination` name which does not exist as a binding. Therefore such name will be treated as dynamic destination as described in <> section. @@ -754,7 +754,7 @@ public boolean send(String bindingName, @Nullable String binderType, Object data As you can see there is one additional argument that you can provide - `binderType`, telling BindingService which binder to use when creating dynamic binding. -NOTE: For cases where `spring.cloud.stream.source` property is used or the binding was already created under different binder, the `binderType` +NOTE: For cases where `spring.cloud.stream.output-bindings` property is used or the binding was already created under different binder, the `binderType` argument will have no effect. ====== Using channel interceptors with StreamBridge