Renamed spring.cloud.channels to spring.cloud.stream in configuration
This commit is contained in:
committed by
Mark Fisher
parent
dca40fec59
commit
1a51c32f59
@@ -41,7 +41,7 @@ The `application.yml` has the mapping from channel names to external broker hand
|
||||
---
|
||||
spring:
|
||||
cloud:
|
||||
channels:
|
||||
stream:
|
||||
outputChannelName: ${spring.application.name:ticker}
|
||||
----
|
||||
|
||||
@@ -80,7 +80,7 @@ NOTE: In this case there is only one `Source` in the application context so ther
|
||||
|
||||
== Multiple Input or Output Channels
|
||||
|
||||
A module can have multiple input or output channels all defined either as `@Input` and `@Output` methods in an interface (preferrable) or as bean definitions. Instead of just one channel named "input" or "output" you can add multiple `MessageChannel` methods annotated `input.*` or `output.*` and the names are converted to external channel names on the broker. The external channel names are the `spring.cloud.channels.[input|output]ChannelName` plus the `MessageChannel` bean name, period separated. In addition, the bean name can be `input.[queue|topic|tap]:*` or `output.[queue|topic]:*` (i.e. with a channel type as a colon-separated prefix), and the semantics of the external bus channel changes accordingly (a tap is like a topic). For example, you can have two `MessageChannels` called "output" and "output.topic:foo" in a module with `outputChannelName=bar`, and the result is 2 external channels called "bar" and "topic:foo.bar".
|
||||
A module can have multiple input or output channels all defined either as `@Input` and `@Output` methods in an interface (preferrable) or as bean definitions. Instead of just one channel named "input" or "output" you can add multiple `MessageChannel` methods annotated `input.*` or `output.*` and the names are converted to external channel names on the broker. The external channel names are the `spring.cloud.stream.[input|output]ChannelName` plus the `MessageChannel` bean name, period separated. In addition, the bean name can be `input.[queue|topic|tap]:*` or `output.[queue|topic]:*` (i.e. with a channel type as a colon-separated prefix), and the semantics of the external bus channel changes accordingly (a tap is like a topic). For example, you can have two `MessageChannels` called "output" and "output.topic:foo" in a module with `outputChannelName=bar`, and the result is 2 external channels called "bar" and "topic:foo.bar".
|
||||
|
||||
== Samples
|
||||
|
||||
@@ -128,7 +128,7 @@ To tap an existing output channel in an XD module you just need to know its grou
|
||||
```
|
||||
spring:
|
||||
cloud:
|
||||
channels:
|
||||
stream:
|
||||
group: tocktap
|
||||
name: logger
|
||||
index: 0
|
||||
@@ -138,7 +138,7 @@ spring:
|
||||
index: 0
|
||||
```
|
||||
|
||||
The `spring.cloud.channels.tap` section tells the module runner which topic you want to subscribe to. It creates a new group (a tap can't be in the same group as the one it is tapping) and starts a new index count, in case anyone wants to listen downstream.
|
||||
The `spring.cloud.stream.tap` section tells the module runner which topic you want to subscribe to. It creates a new group (a tap can't be in the same group as the one it is tapping) and starts a new index count, in case anyone wants to listen downstream.
|
||||
|
||||
|
||||
== Building
|
||||
|
||||
@@ -37,7 +37,7 @@ The `application.yml` has the mapping from channel names to external broker hand
|
||||
---
|
||||
spring:
|
||||
cloud:
|
||||
channels:
|
||||
stream:
|
||||
outputChannelName: ${spring.application.name:ticker}
|
||||
----
|
||||
|
||||
@@ -76,7 +76,7 @@ NOTE: In this case there is only one `Source` in the application context so ther
|
||||
|
||||
== Multiple Input or Output Channels
|
||||
|
||||
A module can have multiple input or output channels all defined either as `@Input` and `@Output` methods in an interface (preferrable) or as bean definitions. Instead of just one channel named "input" or "output" you can add multiple `MessageChannel` methods annotated `input.*` or `output.*` and the names are converted to external channel names on the broker. The external channel names are the `spring.cloud.channels.[input|output]ChannelName` plus the `MessageChannel` bean name, period separated. In addition, the bean name can be `input.[queue|topic|tap]:*` or `output.[queue|topic]:*` (i.e. with a channel type as a colon-separated prefix), and the semantics of the external bus channel changes accordingly (a tap is like a topic). For example, you can have two `MessageChannels` called "output" and "output.topic:foo" in a module with `outputChannelName=bar`, and the result is 2 external channels called "bar" and "topic:foo.bar".
|
||||
A module can have multiple input or output channels all defined either as `@Input` and `@Output` methods in an interface (preferrable) or as bean definitions. Instead of just one channel named "input" or "output" you can add multiple `MessageChannel` methods annotated `input.*` or `output.*` and the names are converted to external channel names on the broker. The external channel names are the `spring.cloud.stream.[input|output]ChannelName` plus the `MessageChannel` bean name, period separated. In addition, the bean name can be `input.[queue|topic|tap]:*` or `output.[queue|topic]:*` (i.e. with a channel type as a colon-separated prefix), and the semantics of the external bus channel changes accordingly (a tap is like a topic). For example, you can have two `MessageChannels` called "output" and "output.topic:foo" in a module with `outputChannelName=bar`, and the result is 2 external channels called "bar" and "topic:foo.bar".
|
||||
|
||||
== Samples
|
||||
|
||||
@@ -124,7 +124,7 @@ To tap an existing output channel in an XD module you just need to know its grou
|
||||
```
|
||||
spring:
|
||||
cloud:
|
||||
channels:
|
||||
stream:
|
||||
group: tocktap
|
||||
name: logger
|
||||
index: 0
|
||||
@@ -134,5 +134,5 @@ spring:
|
||||
index: 0
|
||||
```
|
||||
|
||||
The `spring.cloud.channels.tap` section tells the module runner which topic you want to subscribe to. It creates a new group (a tap can't be in the same group as the one it is tapping) and starts a new index count, in case anyone wants to listen downstream.
|
||||
The `spring.cloud.stream.tap` section tells the module runner which topic you want to subscribe to. It creates a new group (a tap can't be in the same group as the one it is tapping) and starts a new index count, in case anyone wants to listen downstream.
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ The `application.yml` has the external channel names, e.g.
|
||||
---
|
||||
spring:
|
||||
cloud:
|
||||
channels:
|
||||
stream:
|
||||
outputChannelName: ${spring.application.name:ticker}
|
||||
```
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
spring:
|
||||
cloud:
|
||||
channels:
|
||||
stream:
|
||||
inputChannelName: testtock
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
fixedDelay: 5000
|
||||
spring:
|
||||
cloud:
|
||||
channels:
|
||||
stream:
|
||||
outputChannelName: testtock
|
||||
|
||||
@@ -2,7 +2,7 @@ server:
|
||||
port: 8081
|
||||
spring:
|
||||
cloud:
|
||||
channels:
|
||||
stream:
|
||||
inputChannelName: testtock
|
||||
# uncomment below to have this module consume from a specific partition
|
||||
# in the range of 0 to N-1, where N is the upstream module's partitionCount
|
||||
|
||||
@@ -3,7 +3,7 @@ server:
|
||||
fixedDelay: 5000
|
||||
spring:
|
||||
cloud:
|
||||
channels:
|
||||
stream:
|
||||
outputChannelName: testtock
|
||||
# uncomment below to use the last digit of the seconds as a partition key
|
||||
# hashcode(key) % N is then applied with N being the partitionCount value
|
||||
@@ -16,5 +16,5 @@ spring:
|
||||
spring:
|
||||
profiles: extended
|
||||
cloud:
|
||||
channels:
|
||||
stream:
|
||||
outputChannelName: xformed
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
spring:
|
||||
cloud:
|
||||
channels:
|
||||
stream:
|
||||
group: tocktap
|
||||
name: logger
|
||||
index: 0
|
||||
|
||||
@@ -2,7 +2,7 @@ server:
|
||||
port: 8082
|
||||
spring:
|
||||
cloud:
|
||||
channels:
|
||||
stream:
|
||||
outputChannelName: xformed
|
||||
inputChannelName: testtock
|
||||
|
||||
@@ -230,10 +230,10 @@ public class AggregateBuilder implements ApplicationContextAware {
|
||||
args.add("--spring.config.name=" + this.configName);
|
||||
}
|
||||
if (this.input != null) {
|
||||
args.add("--spring.cloud.channels.inputChannelName=" + this.input);
|
||||
args.add("--spring.cloud.stream.inputChannelName=" + this.input);
|
||||
}
|
||||
if (this.output != null) {
|
||||
args.add("--spring.cloud.channels.outputChannelName=" + this.output);
|
||||
args.add("--spring.cloud.stream.outputChannelName=" + this.output);
|
||||
}
|
||||
this.builder.run(args.toArray(new String[0]));
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
* @author Dave Syer
|
||||
*
|
||||
*/
|
||||
@ConfigurationProperties("spring.cloud.channels")
|
||||
@ConfigurationProperties("spring.cloud.stream")
|
||||
@JsonInclude(Include.NON_DEFAULT)
|
||||
public class ChannelBindingProperties {
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
@ConditionalOnMissingBean(value = ChannelBindingProperties.class, search = SearchStrategy.CURRENT)
|
||||
public class ChannelBindingPropertiesAutoConfiguration {
|
||||
|
||||
@Bean(name = "spring.cloud.channels.CONFIGURATION_PROPERTIES")
|
||||
@Bean(name = "spring.cloud.stream.CONFIGURATION_PROPERTIES")
|
||||
public ChannelBindingProperties moduleProperties() {
|
||||
return new ChannelBindingProperties();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user