I find it interesting, so i’m going to jump in,
@Allard i would find it also interesting to use a command interceptor for this particular ‘validation’, please correct me if necessary as ‘i are still n00b’.
@Chirdeep to honor REST principles, i wouldn’t ‘design’ anything that ‘waits’ for something. ‘Accept’ the request (e.g. 202) via your REST resource URI (e.g. the POST or PUT) and poll later for status.
I’m still learning a lot in Axon, but i am working in a quite complex implementation using it and never saw this ‘pattern’ being implemented by already experienced devs. What i’m saying is, commands are dispatched and the event handler will back-off if errors (in spring - that’s JPA Repository in my case)
Also embracing CQRS principles the aggregate shouldn’t inspect other ‘systems’ in order to create for itself a ‘big-picture’. Also, correct me if necessary.