A microservice architecture, as opposed to a monolithic architecture, consists of a large number of services. Since they're divided into multiple modules, each of them can be developed separately.
Nest provides a package, "microservices". It can be installed by typing:
$ npm i --save @nestjs/microservices
, or with yarn:
$ yarn install @nestjs/microservices
Microservices use the TCP transport layer by default.
In the controller classes, the @MessagePattern() decorator is used to create a message handler. Message handlers can response either synchronously or asynchronously, therefore async methods are applicable here.
to be continued... (w/ ClientsModule, ClientProxy, @Client(), etc.)