'Can you listen for SpringCamelContext status?

Using EventNotifierSupport, I can listen for CamelContextStartedEvent. However, I need to add one more root to the context, after all the other routes have already been initialized. Currently, the event occurs after camelcontext have been initialized, but after that we have hundreds of SpringCamelContext routes added, and as I understand, there is no "SpringCamelContextStartedEvent", so I have no idea of how to add route after all other routes are already initialized. I suspect that there is fundamental error in my logic, please correct me if I am wrong somewhere.

    @Override
    public void notify(EventObject event) throws Exception {
        if (event instanceof CamelContextStartedEvent) {
            log.info("CamelContextStartedEvent for {}", event.getSource());
            startWarmupThread();
        }
    }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source