The aggregate collects events while it changes; the application service publishes them only after the save succeeds (see the outbox pattern for doing that reliably).