You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/spring-cloud-stream/bindings.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
As stated earlier, _Bindings_ provide a bridge between the external messaging system (e.g., queue, topic etc.) and application-provided _Producers_ and _Consumers_.
6
6
7
7
The following example shows a fully configured and functioning Spring Cloud Stream application that receives the payload of the message
8
-
as a `String` type (see <<Content Type Negotiation>> section), logs it to the console and sends it down stream after converting it to upper case.
8
+
as a `String` type (see xref:spring-cloud-stream/content-type.adoc#content_type_management[Content Type Negotiation] section), logs it to the console and sends it down stream after converting it to upper case.
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/spring-cloud-stream/functional-binding-names.adoc
+3-3
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ The naming convention used to name input and output bindings is as follows:
26
26
27
27
The `in` and `out` corresponds to the type of binding (such as _input_ or _output_).
28
28
The `index` is the index of the input or output binding. It is always 0 for typical single input/output function,
29
-
so it's only relevant for <<Functions with multiple input and output arguments>>.
29
+
so it's only relevant for xref:spring-cloud-stream/producing-and-consuming-messages.adoc#functions_with_multiple_input_and_output_arguments[Functions with multiple input and output arguments].
30
30
31
31
So if for example you would want to map the input of this function to a remote
32
32
destination (e.g., topic, queue etc) called "my-topic" you would do so with the following property:
@@ -54,9 +54,9 @@ properties can refer to `input` binding name instead (e.g., `--spring.cloud.str
54
54
NOTE: While descriptive binding names may enhance the readability aspect of the configuration, they also create
55
55
another level of misdirection by mapping an implicit binding name to an explicit binding name. And since all subsequent
56
56
configuration properties will use the explicit binding name you must always refer to this 'bindings' property to
57
-
correlate which function it actually corresponds to. We believe that for most cases (with the exception of <<Functional Composition>>)
57
+
correlate which function it actually corresponds to. We believe that for most cases (with the exception of xref:spring-cloud-stream/producing-and-consuming-messages.adoc#functional-composition[Functional Composition])
58
58
it may be an overkill, so, it is our recommendation to avoid using it altogether, especially
59
59
since not using it provides a clear path between binder destination and binding name, such as `spring.cloud.stream.bindings.uppercase-in-0.destination=sample-topic`,
60
60
where you are clearly correlating the input of `uppercase` function to `sample-topic` destination.
61
61
62
-
For more on properties and other configuration options please see <<Configuration Options>> section.
62
+
For more on properties and other configuration options please see xref:spring-cloud-stream/configuration-options.adoc#configuration-options[Configuration Options] section.
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/spring-cloud-stream/producing-and-consuming-messages.adoc
+8-8
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ public class MyFunctionBootApp {
48
48
In the preceding example, we define a bean of type `java.util.function.Function` called _toUpperCase_ to be acting as message handler
49
49
whose 'input' and 'output' must be bound to the external destinations exposed by the provided destination binder.
50
50
By default the 'input' and 'output' binding names will be `toUpperCase-in-0` and `toUpperCase-out-0`.
51
-
Please see <<Functional binding names>> section for details on naming convention used to establish binding names.
51
+
Please see xref:spring-cloud-stream/functional-binding-names.adoc#functional-binding-names[Functional Binding Names] section for details on naming convention used to establish binding names.
52
52
53
53
Below are the examples of simple functional applications to support other semantics:
54
54
@@ -315,7 +315,7 @@ When using Observability support provided by the framework as well as supporting
315
315
==== StreamBridge and Dynamic Destinations
316
316
317
317
`StreamBridge` can also be used for cases when output destination(s) are not known ahead of time similar to the use cases
318
-
described in <<Routing FROM Consumer>> section.
318
+
described in xref:spring-cloud-stream/event-routing.adoc#routing-from-consumer[Routing FROM consumer] section.
319
319
320
320
Let's look at the example
321
321
@@ -344,7 +344,7 @@ public class WebSourceApplication {
344
344
As you can see the preceding example is very similar to the previous one with the exception of explicit binding instruction provided via
345
345
`spring.cloud.stream.output-bindings` property (which is not provided).
346
346
Here we're sending data to `myDestination` name which does not exist as a binding. Therefore such name will be treated as dynamic destination
347
-
as described in <<Routing FROM Consumer>> section.
347
+
as described in xref:spring-cloud-stream/event-routing.adoc#routing-from-consumer[Routing FROM consumer] section.
348
348
349
349
350
350
In the preceding example, we are using `ApplicationRunner` as a _foreign source_ to feed the stream.
@@ -399,7 +399,7 @@ Or if you send data as a `Message`, its content type will be honored.
399
399
400
400
Spring Cloud Stream supports multiple binder scenarios. For example you may be receiving data from Kafka and sending it to RabbitMQ.
401
401
402
-
For more information on multiple binders scenarios, please see <<Binders>> section and specifically <<Multiple Binders on the Classpath>>
402
+
For more information on multiple binders scenarios, please see xref:spring-cloud-stream/binders.adoc#binders[Binders] section and specifically xref:spring-cloud-stream/multiple-binders.adoc#multiple-binders[Multiple Binders on the Classpath]
403
403
404
404
In the event you are planning to use StreamBridge and have more then one binder configured in your application you must also tell StreamBridge
405
405
which binder to use. And for that there are two more variations of `send` method:
@@ -546,7 +546,7 @@ the fact that you can compose _reactive_ and _imperative_ functions.
546
546
547
547
The result of a composition is a single function which, as you may guess, could have a very long and rather cryptic name (e.g., `foo|bar|baz|xyz. . .`)
548
548
presenting a great deal of inconvenience when it comes to other configuration properties. This is where _descriptive binding names_
549
-
feature described in <<Functional binding names>> section can help.
549
+
feature described in xref:spring-cloud-stream/functional-binding-names.adoc#functional-binding-names[Functional Binding Names] section can help.
550
550
551
551
For example, if we want to give our `toUpperCase|wrapInQuotes` a more descriptive name we can do so
552
552
with the following property `spring.cloud.stream.function.bindings.toUpperCase|wrapInQuotes-in-0=quotedUpperCaseInput` allowing
@@ -604,8 +604,8 @@ While trivial, this example demonstrates how one function enriches the incoming
604
604
so the other function - `echo` - can benefit form it. The `echo` function stays clean and focused on business logic only.
605
605
You can also see the usage of `spring.cloud.stream.function.bindings` property to simplify composed binding name.
=== Functions with multiple input and output arguments
607
+
608
+
=== Functions with multiple input and output arguments [[functions_with_multiple_input_and_output_arguments]]
609
609
610
610
Starting with version 3.0 spring-cloud-stream provides support for functions that
611
611
have multiple inputs and/or multiple outputs (return values). What does this actually mean and
@@ -633,7 +633,7 @@ spring-cloud-stream and so on.
633
633
So to accommodate all these requirements the initial support is relying on the signature which utilizes another abstraction
634
634
provided by _Project Reactor_ - Tuples. However, we are working on allowing a more flexible signatures.
635
635
636
-
IMPORTANT: Please refer to <<Binding and Binding names>> section to understand the naming convention used to establish _binding names_
636
+
IMPORTANT: Please refer to xref:spring-cloud-stream/binding-names.adoc#binding-names[Binding and Binding names] section to understand the naming convention used to establish _binding names_
0 commit comments