Spring Cloud Stream Reference Guide

Authors

Sabby Anandan, Marius Bogoevici, Eric Bottard, Mark Fisher, Ilayaperumal Gopinathan, Gunnar Hillert, Mark Pollack, Patrick Peralta, Glenn Renfro, Thomas Risberg, Dave Syer, David Turanski, Janne Valkealahti, Benjamin Klein, Soby Chacko, Vinicius Carvalho

Chelsea.SR1

Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.


Table of Contents

I. Spring Cloud Stream Core
1. Introducing Spring Cloud Stream
2. Main Concepts
2.1. Application Model
2.1.1. Fat JAR
2.2. The Binder Abstraction
2.3. Persistent Publish-Subscribe Support
2.4. Consumer Groups
2.4.1. Durability
2.5. Partitioning Support
3. Programming Model
3.1. Declaring and Binding Channels
3.1.1. Triggering Binding Via @EnableBinding
3.1.2. @Input and @Output
Customizing Channel Names
Source, Sink, and Processor
3.1.3. Accessing Bound Channels
Injecting the Bound Interfaces
Injecting Channels Directly
3.1.4. Producing and Consuming Messages
Native Spring Integration Support
Spring Integration Error Channel Support
Using @StreamListener for Automatic Content Type Handling
Using @StreamListener for dispatching messages to multiple methods
3.1.5. Reactive Programming Support
Reactor-based handlers
RxJava 1.x support
3.1.6. Aggregation
Configuring aggregate application
Configuring binding service properties for non self contained aggregate application
4. Binders
4.1. Producers and Consumers
4.2. Binder SPI
4.3. Binder Detection
4.3.1. Classpath Detection
4.4. Multiple Binders on the Classpath
4.5. Connecting to Multiple Systems
4.6. Binder configuration properties
5. Configuration Options
5.1. Spring Cloud Stream Properties
5.2. Binding Properties
5.2.1. Properties for Use of Spring Cloud Stream
5.2.2. Consumer properties
5.2.3. Producer Properties
5.3. Using dynamically bound destinations
6. Content Type and Transformation
6.1. MIME types
6.2. MIME types and Java types
6.3. Customizing message conversion
6.4. @StreamListener and Message Conversion
7. Schema evolution support
7.1. Apache Avro Message Converters
7.2. Converters with schema support
7.3. Schema Registry Support
7.4. Schema Registry Server
7.4.1. Schema Registry Server API
POST /
GET /{subject}/{format}/{version}
GET /{subject}/{format}
GET /schemas/{id}
DELETE /{subject}/{format}/{version}
DELETE /schemas/{id}
DELETE /{subject}
7.5. Schema Registry Client
7.5.1. Schema Registry Client properties
7.6. Avro Schema Registry Client Message Converters
7.6.1. Avro Schema Registry Message Converter properties
7.7. Schema Registration and Resolution
7.7.1. Schema Registration Process (Serialization)
7.7.2. Schema Resolution Process (Deserialization)
8. Inter-Application Communication
8.1. Connecting Multiple Application Instances
8.2. Instance Index and Instance Count
8.3. Partitioning
8.3.1. Configuring Output Bindings for Partitioning
Spring-managed custom PartitionKeyExtractorClass implementations
Configuring Input Bindings for Partitioning
9. Testing
10. Health Indicator
11. Metrics Emitter
12. Samples
13. Getting Started
II. Binder Implementations
14. Apache Kafka Binder
14.1. Usage
14.2. Apache Kafka Binder Overview
14.3. Configuration Options
14.3.1. Kafka Binder Properties
14.3.2. Kafka Consumer Properties
14.3.3. Kafka Producer Properties
14.3.4. Usage examples
Example: Setting autoCommitOffset false and relying on manual acking.
Example: security configuration
Using the binder with Apache Kafka 0.10
Excluding Kafka broker jar from the classpath of the binder based application
14.4. Dead-Letter Topic Processing
15. RabbitMQ Binder
15.1. Usage
15.2. RabbitMQ Binder Overview
15.3. Configuration Options
15.3.1. RabbitMQ Binder Properties
15.3.2. RabbitMQ Consumer Properties
15.3.3. Rabbit Producer Properties
15.4. Retry With the RabbitMQ Binder
15.4.1. Overview
15.4.2. Putting it All Together
15.5. Dead-Letter Queue Processing
15.5.1. Non-Partitioned Destinations
15.5.2. Partitioned Destinations
republishToDlq=false
republishToDlq=true
III. Appendices
A. Building
A.1. Basic Compile and Test
A.2. Documentation
A.3. Working with the code
A.3.1. Importing into eclipse with m2eclipse
A.3.2. Importing into eclipse without m2eclipse
A.4. Sign the Contributor License Agreement
A.5. Code Conventions and Housekeeping