I\'m trying to implement my own CQRS infrastructure with Event Sourcing to learn it better. As a sample project I\'m implementing a blog engine, I know it might not be a perfect
It depends what 'the business' wants to happen. If you want the client (creator of the commands) to be responsible for choosing a short URL, it should have a read store that it verifies the uniqueness of it from. When the user types in a short URL, the view should check that the short URL is unique and present a validation error if it is not. Whenever a post is saved, an event will publish the updated info (including the short URL) which keeps the read store in sync.