Posts

Spring Boot + RabbitMQ - Producer and Consumer Example

Image
In this section, we will learn how to do asynchronous communication using RabbitMQ in  Spring Boot application. We will develop two Spring Boot applications, one producer and one consumer application, then  we will learn how to use RabbitMQ broker in the Spring boot application to send and receive messages between the Producer and the Consumer. 1. What is Message Broker? In the digital world, different systems are constantly sending or receiving messages. This must be carried out in a controlled manner so that messages do not block each other, end up creating a jam and processes cannot function optimally. In order for applications to be able to communicate with each other easily, it makes sense to create an intermediary, that is, a service that is responsible for managing the distribution of messages: this is what is known as a messaging broker . RabbitMQ , one of the best known. 2. What is RabbitMQ? RabbitMQ is a message broker  that acts as an intermediary platform where different

Integrate HashiCorp Vault with Spring Boot application

Image
In this section, we will learn how to integrate HashiCorp Vault with Spring Boot application and how to use HashiCorp vault to store secret in Spring Boot application. Assume in production environment we need to setup secure storage for our application database credentials, passwords, API keys or any other secret and sensitive data. HashiCorp vault allows us to secure applications and protect sensitive data with reduce the risk of breaches and data exposure with identity-based security automation and encryption-as-a-service. Let's begin, 1. HashiCorp vault local installation First, you should install hashicorp vault in your local machine.   Please refer installation guide (macOS, Windows, Linux) to setup vault locally. 2. Start the vault server After installed the vault, execute following command to start vault server: vault server - dev If everything goes fine, you will find similar output in the console like below :  Copy Root token for future purpose. If you need to set custom