Only hit the database once when publishing events