O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Commands

Commands are used whenever any microservice wants another microservice to perform an action. They are synchronous in nature and are generally implemented using HTTP POST or PUT requests. For example, in the preceding figure, the rewards program microservice sends a command to user profile microservice or invoice microservice regarding promotional offers based on rewards. When sending a command fails, the sender won't know if the receiver processed the command or not. This can result in errors or some degraded functionalities if a set of rules is not followed by the sender as well as receiver side.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required