@SpringBootApplication
-@EnableChannelBinding
+@EnableModule
@ComponentScan(basePackageClasses=ModuleDefinition.class)
public class ModuleApplication {
@@ -468,9 +468,6 @@ spring:
outputChannelName: ${spring.application.name:ticker}
diff --git a/spring-cloud-stream.html b/spring-cloud-stream.html index e65018be5..def97981f 100644 --- a/spring-cloud-stream.html +++ b/spring-cloud-stream.html @@ -417,7 +417,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
This project allows a user to develop and run messaging microservices using Spring Integration and run them locally, or in the cloud, or even on Spring XD. Just create MessageChannels "input" and/or "output" and add @EnableChannelBinding and run your app as a Spring Boot app (single application context). You just need to connect to the physical broker for the bus, which is automatic if the relevant bus implementation is available on the classpath. The sample uses Redis.
This project allows a user to develop and run messaging microservices using Spring Integration and run them locally, or in the cloud, or even on Spring XD. Just create MessageChannels "input" and/or "output" and add @EnableModule and run your app as a Spring Boot app (single application context). You just need to connect to the physical broker for the bus, which is automatic if the relevant bus implementation is available on the classpath. The sample uses Redis.
Here’s a sample source module (output channel only):
@@ -425,7 +425,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b@SpringBootApplication
-@EnableChannelBinding
+@EnableModule
@ComponentScan(basePackageClasses=ModuleDefinition.class)
public class ModuleApplication {
@@ -468,9 +468,6 @@ spring:
outputChannelName: ${spring.application.name:ticker}
To be deployable as an XD module in a "traditional" way you need /config/.properties to point to any available Java config classes (via base_packages or options_class), or else you can put traditional XML configuration in /config/.xml. You don’t need those things to run as a consumer or producer to an existing XD system, but you do need to replace the outputChannelName with group, module and index (the index is a sequential counter that XD uses to label the modules in a stream from left to right). There’s an XML version of the same sample (a "timer" source).
There are several samples, all running on the redis transport (so you need redis running locally to test them).