sample implementation of event queue processing with restrictions