Return type for constructor-based command handler

What’s the return type for a constructor that serves as a command handler? I don’t see anything in the documentation that calls this particular case out.

hi @jesse.docken,

That is an interesting one as I never tried it myself.
So, after trying and digging our docs, I found it here.

To quote it:

While it is possible to return results from command handlers, this should be used sparsely. … The framework has one such exception build in, on the @CommandHandler annotated constructor of an Aggregate. In case the ‘command handling constructor’ has executed successfully, instead of the Aggregate itself, the value of the @AggregateIdentifier annotated field will be returned.