AuditLogger - Command instance


First of all, thank you for the amazing work and the high quality framework.

I would like to use the AuditLogger to log the command (and events) that were generated.
Both methods in this interface takes command as Object and not as CommandMessage.
Looking at the code, I know it is of type CommandMessage.

Any reason why the AuditLogger interface doesn’t use CommandMessage instead of Object?


Hi Harel,

I think you caught a bit of legacy here. In Axon 1, a command was just an object. There was no meta data. Axon 2 introduced the (Command)Message, which wraps the command. I guess the interface never caught my attention, as it wouldn’t have caused a compile error.
Thanks for noticing, though. Will need to change this in the future.



Many thanks.