Skip to content

Instantly share code, notes, and snippets.

@StarpTech
Last active January 4, 2020 21:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StarpTech/ad9114575c6ac40a21e084cfceb3f222 to your computer and use it in GitHub Desktop.
Save StarpTech/ad9114575c6ac40a21e084cfceb3f222 to your computer and use it in GitHub Desktop.
Run command and publish events
func (c *CommandBus) HandleCommand(cmd Command) {
events := c.CommandHandler.HandleCommand(cmd)
c.stan.Publish("eventstore.events", events)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment