private OnSubscribe<Message> getOnSubscribe() {
        return subscriber -> {
            Observable<Long> interval =
                    Observable.interval(pollTimeMS, TimeUnit.MILLISECONDS, scheduler);
            interval.flatMap(
                            (Long x) -> {
                                if (!isRunning()) {
                                    LOGGER.debug(
                                            "Component stopped, skip listening for messages from Conductor Queue");
                                    return Observable.from(Collections.emptyList());
                                }
                                List<Message> messages = receiveMessages();
                                return Observable.from(messages);
                            })
                    .subscribe(subscriber::onNext, subscriber::onError);
        };
    }
An {@link ObservableQueue} implementation using the underlying {@link QueueDAO} implementation.
core/src/main/java/com/netflix/conductor/core/events/queue/ConductorObservableQueue.java