code: public void stop() {
          // set the record flag to false
          if (recording.compareAndSet(true, false)) {
              // remove the scheduled job
              scheduler.removeScheduledJob(eventQueueJobName);
              if (queue.isEmpty()) {
                  log.debug("Event queue was empty on stop");
              } else {
                  if (!eqj.processing.get()){
                    log.debug("Event queue was not empty on stop and it's not processing, processing...");
                    do {
                      processQueue();
                    } while (!queue.isEmpty());
                  }else{
                    log.debug("Event queue was not empty on stop but it's in processing, waiting...");
                    do {
                    } while (!queue.isEmpty());
                  }
                  log.debug("Processing done, event queue empty, moving on");
              }
              recordingConsumer.uninit();
          } else {
              log.debug("Recording listener was already stopped");
          }
      }
docs: {@inheritDoc}