class Notifier implements ApplicationListener<ApplicationReadyEvent> {

    @Override
    public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
        if (!running.compareAndSet(false, true)) return; // already running

        Thread notifyLoop = new Thread(this::loopUntilShutdown);
        notifyLoop.setName("adaptivealerting notify loop");
        notifyLoop.setDaemon(true);
        notifyLoop.start();
    }

    @Autowired public  Notifier(NotifierConfig notifierConfig, ObjectMapper objectMapper, RestTemplate restTemplate);

}