Spring Cloud Stream: Difference between revisions
Line 55: | Line 55: | ||
* [[@EnableBinding]] - provides immediate connectivity to a message broker. | * [[@EnableBinding]] - provides immediate connectivity to a message broker. | ||
* [[@StreamListener]] | * [[@StreamListener]] - annotates a [[#Message_Handler|handler method]] to receive events for stream processing. | ||
==Persistent Publish/Subscribe== | ==Persistent Publish/Subscribe== |
Revision as of 20:47, 23 October 2018
External
- https://cloud.spring.io/spring-cloud-stream/
- https://cloud.spring.io/spring-cloud-stream-app-starters/
- Spring Cloud Stream Core https://docs.spring.io/spring-cloud-stream/docs/Elmhurst.RELEASE/reference/htmlsingle/#_spring_cloud_stream_core
Internal
Overview
Spring Cloud Stream is a framework for building highly scalable event-driven microservices connected with shared messaging systems. Spring applications use Spring Cloud Stream libraries to bind to a messaging middleware. Spring Cloud Stream builds upon Spring Boot to create standalone production-grade applications and uses Spring Integration to provide connectivity to message brokers.
Concepts
Destination Binder
The component responsible to provide integration with external messaging systems. Available binders:
Destination Binding
Bridge between the external messaging system and application-provided Producers and Consumers of messages. The Producers and Consumers are created by the Destination Binders.
Sink Binding
Input and no output.
Destination
The destination can be a queue, topic, or others.
Message
The canonical data structure used by Producers and Consumers to communicate with Destination Binders, and thus other applications via external messaging systems.
Message Handler
Is this the same thing as the handler method?
@StreamListener(Sink.INPUT)
public void handle(...) {
...
}
Also see @StreamListener.
Annotations
- @EnableBinding - provides immediate connectivity to a message broker.
- @StreamListener - annotates a handler method to receive events for stream processing.