code: public void close() {
          if (log.isDebugEnabled()) {
              log.debug("close");
          }
          if (engine != null) {
              // before or on close we may need to allow the queued messages a chance to clear
              engine.close();
              onChange(StreamState.CLOSED);
              items.clear();
              // clear jobs
              if (schedulingService != null && !jobs.isEmpty()) {
                  jobs.forEach(jobName -> schedulingService.removeScheduledJob(jobName));
                  jobs.clear();
              }
          }
      }
docs: {@inheritDoc}