Spring Retry provides the ability to automatically re-invoke a failed operation. This is helpful when errors may be transient in nature. For example, a momentary network glitch, network outage, server down, or deadlock. You can configure the spring-retry module using annotations. You can define the retry limits, fallback methods, etc. In this post, you will learn how to use the spring-retry module. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 <dependency> <groupId>org.
New AOT Engine Brings Spring Native to the Next Level
On behalf of the team and everyone who has contributed, it is my pleasure to announce the release of Spring Native 0.11, which provides native support for Spring Boot 2.6. This ambitious release is the result of five months of hard work by the Spring team, who have been working on a brand new architecture to bring Spring support for creating native executables with GraalVM to the next level. You can already try it on start.
Spring Cloud Gateway and gRPC
Starting from version 3.1.0 as part of the Spring Cloud 2021.0.0 (aka Jubilee) release train, Spring Cloud Gateway included support for gRPC and HTTP/2. We will introduce the basic concepts behind gRPC and how to configure it with two examples: One that showcases how Spring Cloud Gateway can transparently re-route gRPC traffic without needing to know the proto definition and without having to modify our existing gRPC servers. Another that showcases how we can create a custom filter in Spring Cloud Gateway to transform a JSON payload to a gRPC message.
Event Driven Microservices with Spring Cloud Stream and RabbitMQ
The world of microservices is dominated by REST based applications. When we talk about microservices, a natural assumption is a set of individual services talking to each other over HTTP(S) REST. But Event-Driven microservices have important and crucial roles to play in any modern, cloud-based architecture. The usage of events to communicate application states or data is not a new concept. Organizations have been using messaging systems such as IBM MQ for several decades.
Getting started with Spring Cloud Config
Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems. Coordination of distributed systems leads to boilerplate patterns, and using Spring Cloud developers can quickly run services and applications that implement those patterns. They will work well in any distributed environment, including the developer’s laptop, bare metal data centers, and managed platforms such as Cloud Foundry. In this article, I would like to discuss Spring Cloud Config.
Spring Cloud Config Server - Encryption and Decryption
While using Spring Cloud Config Server, we also have the feature to encrypt sensitive information that is otherwise stored as plain text in our external git repository. This prevents anyone who has read access to the external repository from accessing confidential information and is highly highly recommended if you are using a Spring Cloud Config Server. Note: If you haven’t set up Spring Cloud Config Server yet check out my other article on how to set up a spring cloud config server.
Develop Spring Boot App with HANA Cloud in Cloud Foundry
Through this post, you can get: How to build a Spring Boot App consuming HANA Cloud How to deploy Spring Boot App in SAP BTP Cloud Foundry Environment Comparison between consuming HANA Cloud instance directly and through hdi-shared / schema Comparison between consuming HANA Cloud with JDBC and JPA Comparison between HANA Cloud users and their authorizations How to get Trial Account on SAP BTP@AliCloud Trial Account (SAP BTP@AliCloud) If you are an SAP employee , access SAP BTP Control Center – Canary – Alibaba Cloud to grant the service entitlements to your Global Account.
An Intro to Dapr with Spring Cloud Gateway
1. Overview In this article, we’ll start with a Spring Cloud Gateway application and a Spring Boot application. Then, we’ll update it to use Dapr (Distributed Application Runtime) instead. Finally, we’ll update the Dapr configuration to show the flexibility that Dapr provides when integrating with cloud-native components . 2. Intro to Dapr With Dapr, we can manage the deployment of a cloud-native application without any impact on the application itself. Dapr uses the sidecar pattern to off-load deployment concerns from the application, which allows us to deploy it into other environments (such as on-premise, different proprietary Cloud platforms, Kubernetes, and others) without any changes to the application itself .
The best way to log SQL statements with Spring Boot
Introduction In this article, I’m going to show you the best way to log SQL statements when using Spring Boot. Logging SQL queries is very important, as it allows you to validate the number of generated statements, the syntax of the auto-generated queries, as well as prove that JDBC batching works as expected. Don’t log SQL statements with the Spring Boot show-sql property It’s very common for a Spring Boot application to store data in a relational database, and, most often, Spring Data JPA is the default data access technology.
Spring Cloud Streams with Apache Kafka
Have you ever wondered how features like Google Maps’ live traffic work? These systems have to gather and process data in real-time. The architecture of these systems generally involves a data pipeline that processes and transfers data to be processed further until it reaches the clients. In this article, we will see something similar with a simple example using Kafka Streams. The sample app can be found here. Introduction to Spring Cloud Stream Spring Cloud Stream is a framework designed to support stream processing provided by various messaging systems like Apache Kafka, RabbitMQ, etc.
AWS Lambda with Kotlin and Spring Cloud Function
AWS Lambda is a great technology to get your code up and running in a matter of minutes. I’m heavily using AWS Lambda for various automation and marketing tasks for this blog and my online courses. I recently gave Spring Cloud Function with Kotlin for AWS Lambda a try. It’s a powerful combination if you’re familiar with the Spring ecosystem and want to use the same techniques for your Lambda functions.
Enforcing Resilience in a Spring Boot App using Resilience4J
An important property of modern web apps is Resilience. In simple words, resilience is the ability of a system’s feature to fail gracefully without impacting the entire system. In the case of web apps, we want to make sure that the entire system will not be down if a remote service (a database, API Server) fails (is slow or down). What is Resilience4J? Resilience4J is a lightweight, easy-to-use fault tolerance library inspired by Netflix Hystrix but designed for Java 8 and functional programming.
Spring Cloud Config Server: Step by Step
Spring Cloud Config Server is used to provide server-side and client-side support for externalized configuration in a distributed system. So when you have multiple microservices, and you want to easily control the configuration for all of them at one go - you’ll mostly be looking at Spring Cloud Config Server. So how do we do this? We will create a git project which contains all your properties files for the multiple microservices that you have (easy enough).
Kafka Streams with Spring Cloud Stream
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.
Introducing Spring Cloud Square
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.
Spring Cloud Gateway Hystrix
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.
Spring Cloud 2021 0 0 Codename Jubilee Has Been Released
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.
Several algorithms of Loadbalance and its use in ribbon
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.