default Map<String, List<AlarmMessage>> groupMessagesByHook(List<AlarmMessage> alarmMessages) {
        Map<String, List<AlarmMessage>> result = new HashMap<>();
        alarmMessages.forEach(message -> {
            Set<String> hooks = message.getHooks();
            hooks.forEach(hook -> {
                List<AlarmMessage> messages = result.computeIfAbsent(hook, v -> new ArrayList<>());
                messages.add(message);
            });
        });
        return result;
    }
Alarm call back will be called by alarm implementor, after it decided alarm should be sent.
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/alarm/AlarmCallback.java