register a user profile
do some automated background check that the user can actually access the system
The second task is to ensure, for example, that this user wasn't banned from our servers for some reason.
But it could take time, and we'd like to extract it to a separate microservice. It wouldn't be reasonable to keep the user waiting for so long just to know that she was registered successfully.
One way to solve it would be with a message-driven approach including compensation. Let's consider the following architecture:
the user microservice tasked with registering a user profile
the validation microservice tasked with doing a background check
the messaging platform that supports persistent queues
The messaging platform could ensure that the messages sent by the microservices are persisted. Then they would be delivered at a later time if the receiver weren't currently available