Hello,
I’m trying my hands at Axon and I must say I really like it. Didn’t know it existed and ended up doing and event sourced application from scratch about 2 years ago. Axon would have definitely helped on the matter back then if I had found it!
Anyway, I went with the axon quick start videos and am trying to make it run. My current issue is that what is said in the video has since then evolved - you actually need a RoutingKey in your create command.
So here are my questions and thoughts:
- It doesn’t feel natural to me that the one that will emit a command generates the aggregate ID. Am I wrong in thinking that ? What would be the reason to give this kind of responsibility to the one that emits the command ? it feels like it should be a responsibility of the domain event handler.
- I see in the Axon-trader project that you are using Objects in place of IDs: objects that contain a single identifier field that ends up being filled with a UUID. Can you tell me more about this and the reason behind it ? I could guess part of that answer but I’m not sure.
- It also would feel weird to create a specific property only used for routing purpose and it would probably be best to override the routing strategy in that case but I’m wondering then why isn’t this done by default ? We could mark / detect create commands to avoid the need for a routing key by default.
I’m interested in knowing what lead to those design choices so I can better understand the mindset behind axon the responsibility of each part of the application and project myself in my next project that will definitly be using your framework.
Thanks
Regards
Laurent