I have a domain aggregate and whenever something happens in the aggregate an event is applied to change it’s state. However, other services are interested in this event too so when I save the aggregate I then iterate over the events and publish them.
Currently I have a shared package that’s consumed by other services containing the commands and events. My aggregate references this package and uses these events and persists them to the stream (not all but some).
Is this an OK thing to do?