Introduction The example I will show you here about the asynchronous communication among microservices or how microservices communicate asynchronously among themselves. A microservices-based application is a distributed system running on multiple processes or services, usually even across multiple servers or hosts. Each service instance is typically a process. Therefore, services must interact using an inter-process…

Posted in Kafka Microservices Spring Boot

Microservices Asynchronous Communication – Push Notifications

Introduction In this tutorial I am going to show you how to call Spring REST APIs concurrently using Java CompletableFuture. So basically REST service APIs will be invoked parallelly and in parallel execution the response time will be very less. I am going to show you how to call REST APIs concurrently using Java 8…

Posted in Microservices Spring Boot Spring REST

How To Call Spring REST APIs Concurrently using Java CompletableFuture

In this tutorial I am going to explain how to start Spring Cloud microservices on random ports. If you do not specify any port for each of your Spring Boot services, then they will run on the same port and only one application will start and rest of the applications will fail to start. One…

Posted in Microservices Spring Boot Spring Cloud

Spring Cloud Microservices Discovery with Eureka on Random Ports

Introduction Here I am going to show you how to use docker compose for dockerizing Spring Boot Microservices MySQL app. Docker Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services…

Posted in Docker Microservices MySQL Spring Boot

Docker Compose – Dockerizing Spring Boot Microservices MySQL App

Introduction Here I am going to explain how to trace Spring Boot Microservices logs with Spring Cloud Sleuth and Zipkin Server. Spring Cloud Sleuth provides Spring Boot auto-configuration for distributed tracing. One of the problems most developers face difficulty of tracing logs as your microservices applications grow and requests propagate from one microservice to another…

Posted in Microservices Spring Boot Spring Cloud

How to Trace Microservices Logs with Spring Cloud Sleuth and Zipkin

Introduction We will see how to implement circuit breaker pattern using Hystrix in Spring Cloud Gateway. Hystrix is a library from Netflix that implements the circuit breaker pattern. The Hystrix GatewayFilter allows us to introduce circuit breakers to our gateway routes, protecting our services from cascading failures and allowing us to provide fallback responses in…

Posted in Microservices Spring Spring Cloud

How to implement Circuit Breaker Pattern using Hystrix in Spring Cloud Gateway

Introduction Here we will see how to use load balancer name or service name for Microservices instead of host, port for URI while building API gateway using Spring Cloud Gateway – the tutorial example which we have created earlier. We will use the same tutorial to use load balancer name instead of URL, such as,…

Posted in Microservices Spring Spring Cloud

Use load balancer name for Microservices instead of host, port for URI in Spring Cloud Gateway

In this tutorial we will build Spring Cloud Gateway for Microservices built using Spring Boot framework. Spring Cloud Gateway aims to provide a simple, yet effective way to route to APIs and provide cross cutting concerns to them such as: security, monitoring/metrics, and resiliency. Spring Cloud Gateway aims to provide a simple, yet effective way…

Posted in Microservices Spring Spring Cloud

How to build Spring Cloud Gateway for Microservices

In this tutorial we will see an example of event driven streaming using Spring Cloud Stream and Apache Kafka streaming platform. How do we deal with some events, such as, a new user has registered to a portal, an order was placed, a file has been uploaded etc? Let’s say when an order was placed…

Posted in Kafka Microservices Spring Boot Spring Cloud

Event Driven Streaming using Spring Cloud Stream and Apache Kafka

Introduction In this three pages post we will see how to create Spring MongoDB Functional Reactive Microservices Example. We are going to use here Spring 5’s Webflux API. We will also see here how to use Flux and Mono with ServerResponse, ServerRequest in Handler function. We will know how to use RequestPredicates in Router function…

Posted in Microservices MongoDB Reactive Programming Spring WebFlux

Spring MongoDB Functional Reactive Microservices Example

Introduction Here we will see how to create Microservices using Spring Boot and Spring Cloud and build using Gradle tool. What are Microservices? Before I tell you about the microservices, I would like to tell you about monolithic architectural style, which is built as a single, autonomous unit. So let’s say an web application with…

Posted in Gradle Microservices Spring Boot

Create Microservices using Spring Boot and build using Gradle

Here I will explain what is Eureka Server and why do we need to use Eureka server in Microservices Architecture? What is Eureka server? The Eureka server is nothing but an implementation of service discovery pattern, where microservices can register themselves so others can discover them. This server holds information about the client service applications….

Posted in Microservices

What is the use of Eureka server in Microservices