There are so many answers and blog posts saying "never share code between microservices" and I wonder right now how I am supposed to follow that advice. I've got the following microservices and each of them is communicating via RabbitMQ:
The express server and the two different background services have completely different code, while the request workers are just multiple instances. Each request worker is supposed to process a request and return a direct reply to it once it is done with it (RPC).
My question:
I have written a class (RequestScheduler) which offers methods to schedule a request (e. g. getProfile: Promise<IProfile>). Since I am apparently not allowed to share code between microservices what about the code for the communication between the microservices?
I don't see a way how I could avoid sharing that code along with my microservices on the left side.
