SigneUp new User


#1

In SignUpAsync method after adding user to Repo:
you are doing something like this:

await _busPublisher.PublishAsync(new SignedUp(id, email, role), CorrelationContext.Empty);

What is the purpose publishing it on message bus if user was already added to DB?


#2

Simply, because other services (e.g. customers service) might be interested in such fact that happened inside the distributed system.