Support RxJava module

- Add a way to enable `RxJava` module
   - Add `EnableRxJavaModule` annotation that inherits `EnableModule` for `Processor` type.
      - It also registers the custom `MessageHandler` that sets up RxJava `Observable/Subscriber` to process the incoming message reactively.
      - Introduce `RxJavaProcessor` that is expected to be implemented by the module author with the input/output being `Observable`. This processor is autowired into the message handler registered above.
 - Add moving average sample

Add project `spring-cloud-stream-rxjava`

 - This project extends `spring-cloud-stream` so that any RxJava processing module would have this as a dependency
This commit is contained in:
Ilayaperumal Gopinathan
2015-09-01 19:46:19 -07:00
committed by Marius Bogoevici
parent 0debc7aec3
commit 2b1ccc4c7c
13 changed files with 464 additions and 1 deletions

View File

@@ -0,0 +1,36 @@
/*
* Copyright 2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package demo;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = RxJavaApplication.class)
@WebAppConfiguration
@DirtiesContext
public class ModuleApplicationTests {
@Test
public void contextLoads() {
}
}