How to connect two microservices in spring boot? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

How to connect two microservices in spring boot?

A project is an Organization, oNe is Hr department and another is employee department. Both the Microservices are in different different systems. How to connect them together.

26th Aug 2022, 7:47 AM
Dhairya Jain
2 Réponses
+ 3
Microservices can communicate with each other through API calls (for example REST) or message queues. There are more advanced frameworks like service meshes that can handle a large network of these services. You might find these useful: https://stackoverflow.com/questions/50506101/spring-boot-how-to-communicate-between-microservices https://www.edureka.co/blog/microservices-with-spring-boot/amp/
26th Aug 2022, 10:29 AM
Tibor Santa
Tibor Santa - avatar
+ 1
The communication can either be synchronous which is by using HTTP protocol like REST, grpc or asynchronous which is by using any messaging service like Kafka, RabbitMQ. Both have their pros and cons so choose according to your requirement.
26th Aug 2022, 10:48 AM
Avinesh
Avinesh - avatar