modernice / goes

goes is an event-sourcing framework for Go.
https://goes.modernice.dev
Apache License 2.0
134 stars 12 forks source link

Don't decode events and commands before necessary #95

Closed bounoable closed 1 year ago

bounoable commented 1 year ago

Example: Command bus receives a "command dispatched" event, constructs the command for internal processing. This requires the command registry to have the command payload registered even if the user did not subscribe to the command.

Solution: Don't construct the command before knowing that the user subscribed to the command.