Integrating Spring Cloud Stream Binder with RabbitMQ for message sending and receiving

1 Preface Spring Cloud Stream is designed for event-driven microservices systems that use messaging middleware to send and receive messages. Using Spring Cloud Stream allows you to focus on business development without spending too much effort on the interaction between the application and the MQ. Also, you don’t have to make many code changes after switching to MQ. In this article, we will integrate Spring Cloud Stream and RabbitMQ to send and receive messages.

Getting Started with Spring Cloud Data Flow and Confluent Cloud

Data is the currency of competitive advantage in today’s digital age. All organizations struggle with their data due to the sheer variety of data types and ways that it can be shaped, packaged, and evaluated. Within organizations, teams use different tools, fragmented rule sets, and multiple sources to find value within the data. These operational differences lead to divergent definitions of data and a siloed understanding of the ecosystem. These challenges have led to the rise of several new technologies, including Apache Kafka® and Spring Cloud Data Flow.

Log4J2 Vulnerability and Spring Boot

As you may have seen in the news, a new zero-day exploit has been reported against the popular Log4J2 library which can allow an attacker to remotely execute code. The vulnerability has been reported with CVE-2021-44228 against the log4j-core jar and has been fixed in Log4J v2.15.0. Spring Boot users are only affected by this vulnerability if they have switched the default logging system to Log4J2. The log4j-to-slf4j and log4j-api jars that we include in spring-boot-starter-logging cannot be exploited on their own.

Spring Cloud Stream with Schema Registry and Kafka

In this article, you will learn how to use Confluent Schema Registry with Spring Cloud Stream and Kafka in a microservices architecture. We will use Apache Avro to serialize and deserialize events exchanged between our applications. Spring Cloud Stream provides a handy mechanism for integration with Kafka and schema registry. Ok, but before we start, let’s say some words about schema registry. What is this? And why we may use it in our event-driven architecture?

Writing into DynamoDB in a Spring Boot App using AWS Lambda

In this tutorial, we are going to see how to insert records into a DynamoDB table using an AWS Lambda function written using Spring Boot Java. We are also going to add an AWS API Gateway trigger to the Lambda function and see how it works. To follow this tutorial, make sure that you have an active AWS account. If you don’t go ahead and create one. Database setup Before we begin with the Spring Boot application development, we need to create a DynamoDB table.

Spring Retry

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.