@Scheduled(fixedDelay = 60_000)
    public void refreshEventQueues() {
        try {
            Set<String> events =
                    eventHandlerDAO.getAllEventHandlers().stream()
                            .filter(EventHandler::isActive)
                            .map(EventHandler::getEvent)
                            .collect(Collectors.toSet());

            List<ObservableQueue> createdQueues = new LinkedList<>();
            events.forEach(
                    event ->
                            eventToQueueMap.computeIfAbsent(
                                    event,
                                    s -> {
                                        ObservableQueue q = eventQueues.getQueue(event);
                                        createdQueues.add(q);
                                        return q;
                                    }));

            // start listening on all of the created queues
            createdQueues.stream()
                    .filter(Objects::nonNull)
                    .peek(Lifecycle::start)
                    .forEach(this::listen);

            Set<String> removed = new HashSet<>(eventToQueueMap.keySet());
            removed.removeAll(events);
            removed.forEach(
                    key -> {
                        ObservableQueue queue = eventToQueueMap.remove(key);
                        try {
                            queue.stop();
                        } catch (Exception e) {
                            LOGGER.error("Failed to stop queue: " + queue, e);
                        }
                    });

            LOGGER.debug("Event queues: {}", eventToQueueMap.keySet());
            LOGGER.debug("Stored queue: {}", events);
            LOGGER.debug("Removed queue: {}", removed);

        } catch (Exception e) {
            Monitors.error(getClass().getSimpleName(), "refresh");
            LOGGER.error("refresh event queues failed", e);
        }
    }
@return Returns a map of queues which are active. Key is event name and value is queue URI
core/src/main/java/com/netflix/conductor/core/events/DefaultEventQueueManager.java