Using loop or iterator in a monitoring process is not recommended. However, if you have to use a loop, then you can choose one of the following options.
If the external system does not have the information about loop counter, then there is a possibility of missing or step-over of certain events. If this behavior is acceptable, then you can choose this option.