class DispatchTask implements Runnable {

        @Override
        public void run() {
            while (!Thread.currentThread().isInterrupted()) {
                try {
                    Alert alert = dataQueue.pollAlertsData();
                    if (alert != null) {
                        // Determining alarm type storage   判断告警类型入库
                        alertStoreHandler.store(alert);
                        // 通知分发
                        sendNotify(alert);
                    }
                } catch (IgnoreException ignored) {
                } catch (InterruptedException e) {
                    log.error(e.getMessage());
                } catch (Exception exception) {
                    log.error(exception.getMessage(), exception);
                }
            }
        }

        private void sendNotify(Alert alert) {<FILL_FUNCTION_BODY>}
    }

            List<NoticeRule> noticeRules = matchNoticeRulesByAlert(alert);
            // todo Send notification here temporarily single thread     发送通知这里暂时单线程
            if (noticeRules != null) {
                for (NoticeRule rule : noticeRules) {
                    try {
                        if (rule.getTemplateId() == null) {
                            List<Long> receiverIdList = rule.getReceiverId();
                            for (Long receiverId : receiverIdList) {
                                sendNoticeMsg(getOneReceiverById(receiverId),
                                        null, alert);
                            }
                        } else {
                            List<Long> receiverIdList = rule.getReceiverId();
                            for (Long receiverId : receiverIdList) {
                                sendNoticeMsg(getOneReceiverById(receiverId),
                                    getOneTemplateById(rule.getTemplateId()), alert);
                            }
                        }
                    } catch (AlertNoticeException e) {
                        log.warn("DispatchTask sendNoticeMsg error, message: {}", e.getMessage());
                    }
                }
            }
        
<no_super_class>