In this article, you will learn how to use Kafka Streams with Spring Cloud Stream. We will build a simple Spring Boot application that simulates the stock market. Based on that example, I’ll try to explain what a streaming platform is and how it differs from a traditional message broker. If you are looking for an intro to the Spring Cloud Stream project you should read my article about it. It describes how to use Spring Cloud Stream with RabbitMQ in order to build event-driven microservices.
Talking about Spring Cloud ecosystem, you must be familiar with Feign, as shown below, Feign can hide the underlying (okhttp, httpclient) Rest requests, disguised as a SpringMVC-like Controller. You don’t have to splice the url, splice the parameters and so on by yourself, everything is left to Feign. Using Feign to call the API is like calling a local method, avoiding the tedium of constantly parsing/wrapping json data when calling the target microservice.
In the microservice architecture, if the downstream dependency problem occurs, if the upstream caller does not do request degradation processing, the downstream abnormal dependency is not isolated, it is likely that one or two services or as small as one or two interface abnormalities lead to the unavailability of all upstream services, or even affect the whole business line. The mainstream request degradation processing is still the Hystrix from Netfilx.
On December 2, Spring Cloud officially released the first supported version of Spring Boot 2.6 with version number: 2021.0.0 and codename Jubilee. Before we get into the details of the update, let’s mention the most important point: version 2021.0.0 corresponds to Spring Boot from 2.6.1, so don’t use version 2.6.0 if you’re upgrading. Update Summary Spring Cloud Commons Support for configuring for each load balance, this feature also applies to Gateway, Contract and Openfeign.
Load Balancing is an algorithm used to solve the problem that one machine (one process) can’t handle all requests. Load balancing is used in many places like nginx to distribute traffic, ribbon to provide load balancing for clients, load balancing in dubbo service calls, etc. The benefits of using load balancing are obvious. when one or more servers in the cluster go down, the remaining servers that are not down can keep the service running more machines are used to ensure the benign use of machines, so that the system cpu does not rise sharply due to a peak moment There are several implementation strategies for load balancing, the common ones are.