diff --git a/docs/src/main/asciidoc/spring-cloud-stream.adoc b/docs/src/main/asciidoc/spring-cloud-stream.adoc
index abcb020bf..7ec774cb5 100644
--- a/docs/src/main/asciidoc/spring-cloud-stream.adoc
+++ b/docs/src/main/asciidoc/spring-cloud-stream.adoc
@@ -2864,18 +2864,7 @@ testImplementation("org.springframework.cloud:spring-cloud-stream") {
}
---
-***Remove the dependency for `spring-cloud-stream-test-support`***
-To avoid conflicts with the existing test binder you must remove the following entry
-
-[source,xml]
-----
-
+ * This needs a bit of clarification. Just like with any binder, 'destination'
+ * name and 'binding' name are usually the same unless additional configuration
+ * is provided. For example; Assume you have a function 'uppercase'. The
+ * 'binding' names for this function would be 'uppercase-in-0' (for input) and
+ * 'uppercase-out-0' (for output). The 'destination' names would match as well
+ * unless you decide to provide something like
+ * 'spring.cloud.stream.bindings.uppercase-in-0.destination=upper' at which
+ * point the binding names and destination names are different.
+ *
+ * So, it is important to remember that since this binder's goal is to emulate
+ * real binders and real messaging systems you are sending TO and receiving FROM
+ * destination (as if it was real broker destination) and binder will map and
+ * delegate what you send to the binder's destination to individual bindings as
+ * would the real binder.
+ *
+ * *
+ *
+ *
+ * + * // assume the following properties + * "--spring.cloud.fuunction.definition=uppercase", + * "--spring.cloud.stream.bindings.uppercase-in-0.destination=upper", + * "--spring.cloud.stream.bindings.uppercase-out-0.destination=upperout" + * + * // send/receive + * inputDestination.send(message, "upper"); + * Message<byte[]> resultMessage = outputDestination.receive(1000, "upperout"); + * + * // if 'destination' property is not provided for both input and output + * inputDestination.send(message, "uppercase-in-0"); + * Message<byte[]> resultMessage = outputDestination.receive(1000, "upprecase-out-0"); + *+ * + * @param message message to send + * @param destinationName the name of the destination */ - public void send(Message> message, String bindingName) { - this.getChannelByName(bindingName).send(message); + public void send(Message> message, String destinationName) { + this.getChannelByName(destinationName).send(message); } } diff --git a/spring-cloud-stream/src/test/java/org/springframework/cloud/stream/binder/test/TestChannelBinder.java b/spring-cloud-stream/src/test/java/org/springframework/cloud/stream/binder/test/TestChannelBinder.java index 7cce8644b..bbf19939f 100644 --- a/spring-cloud-stream/src/test/java/org/springframework/cloud/stream/binder/test/TestChannelBinder.java +++ b/spring-cloud-stream/src/test/java/org/springframework/cloud/stream/binder/test/TestChannelBinder.java @@ -111,6 +111,7 @@ public class TestChannelBinder extends private Message> lastError; + @SuppressWarnings({ "unchecked", "rawtypes" }) private MessageSource> messageSourceDelegate = () -> new GenericMessage<>( "polled data", new MapBuilder() .put(MessageHeaders.CONTENT_TYPE, "text/plain")