Communication between apps follows the publish subscription pattern, which broadcasts data by sharing the subject. This can be seen in, and it shows a typical deployment of a set of interactive spring Cloud stream applications.
SCST sensor
Figure 6. Spring Cloud Stream Publish-subscribe
The data that the sensor reports to the HTTP endpoint is sent to the public target named Raw-sensor-data. From the destination, it is handled independently by the MicroServices application, which calculates the time window average and another microservices application that imports raw data into HDFs.
To handle the data, two applications declare the subject as their input at run time.
The Publish-subscribe communication model reduces the complexity of producers and consumers and allows new applications to be added to the topology without disrupting existing flows. For example, in the downstream of an average computing application, you can add an application that calculates the highest temperature value to display and monitor.
You can then add another application that interprets the same fault detection averaging process. All communication by sharing a topic rather than a point-to-point queue can reduce the coupling between microservices.
Although the concept of publishing subscription messages is not new, spring Cloud stream requires additional steps to make it a meaningful choice for its application model. By using native middleware support, Spring Cloud Stream also simplifies the use of the publish subscription model on different platforms.
From now on, I will record the process and the essence of the recent development of Spring Cloud micro-service cloud architecture, and help more friends who are interested in developing the Spring cloud framework, hoping to help more good scholars. Let's explore how the Spring cloud architecture is built and how it can be used in enterprise projects.
Spring Cloud Stream Tutorial (iii) Continuous publishing-subscription support