Understanding the requirements
Up until now, we have developed two simple microservices and for the current chapter we plan to extend our transaction microservice to meet the following requirements:
- Every transaction should support the following statuses:
CREATED
,FAILED
,APPROVED
,DECLINED
, andFRAUD
. - The transaction service should now have a new method that changes the status of the given transaction to
FRAUD
. It will update the status of the transaction toFRAUD
and produce a message about the transaction. - The account service will consume this message and after three fraudulent attempts, the account service should read and suspend/block the given account.
We plan to use asynchronous communication between microservices and any other microservice may use this message for internal purposes. You can check Chapter 2 for more information about asynchronous communication between microservices.