Once the service is generated, we can again validate that the generation was successful by deploying it to the local cluster. This time the deployment will be done by using the update command in the CLI, as the local cluster should already be set up from the previous step.
npx @microservice-stack/local-deployment update -s order
After the CLI process has been successfully completed, we can validate the deployment using the kubectl tool
All code for product ordering logic can be seen in the pull request above.
Product ordering works in a way where customer creates a new order request by using REST api. Once the order is created, a new order entity is created and order service broadcasts the message about order creation through the RabbitMQ messaging.
Order created event
This is the first update in which RabbitMQ messaging is used to notify other services of a state change. The event definition can be seen in the service specific constants library.