Microservice sharing code

There are so many answers and blogposts that say, “Never exchange codes between microservices,” and I'm wondering how I should follow this advice. I have the following microservices, and each of them reports through RabbitMQ:

enter image description here

The express server and two different background services have completely different code, and work requests are just a few instances. Each request handler must process the request and return a direct response after it has been completed (RPC).

My question is:

I wrote a class ( RequestScheduler) that offers methods for scheduling a request (for example, getProfile: Promise<IProfile>). Since I'm apparently not allowed to pass code between microservices, what about code for communication between microservices?

, .

+4
1

@kentor logging - . , , . , , - . - . , , - , , , .. what about the code for the communication between the microservices, , . / .

0

Source: https://habr.com/ru/post/1689494/


All Articles