Created the logic to stream the events