zixi0825 commented on issue #14832: URL: https://github.com/apache/dolphinscheduler/issues/14832#issuecomment-1699031843
> > Why we don't directly use alert module? > > Althougn the Alert module and Listener module have similarities in specific scenarios, such as both supporting to notify users about the execution results of workflows/tasks througn various plugins, there are several key differences: > > 1. **Purpose:** > > * **Alert Module:** The Alert module is designed specifically to inform users about the execution results of individual workflows or tasks (which specfied by the user when running the workflow). The content and format of Alert are fixed. Alerts are sent directly to users via emails, Telegram, Ding Talk, etc. > * **Listener Module:** The Listener module is designed for third-party systems to monitor and manage DolphinScheduler. The listener instances are global which are not limited to specific workflows/tasks, so in addition to the workflow/task related events like workflowStartEvent, workflowFailedEvent, etc., it also provides system-wide events like serverDownEvent, workflowAddedEvent, etc. Users can customize the format and content of messages based on listener events. The messages are sent to Kafka, RabbitMQ, external system interfaces, etc > 2. **Flexibility and Extensibility:** > > * **Alert Module:** Alert Plugins are build-in. When creating a new alert plugin, modifications to source code, repackaging, and service restarts are required. The content and format of Alert are fixed. > * **Listener Module:** The listener module offers more flexbility. We can create a separate project to develop new plugins depended on a single module(`dolphinsheduler-dolphinsheduler-common`) , without modifying the source code. Listener plugins can be installed, updated, or uninstalled online without restarting the server. The listener module also provide more flexibility and convenience to customize the message formats and processing methods. To add, the listener also reuses the ability of alertserver to a certain extent, without creating a separate service. It sends event through the AlertServer. However, due to the differences in their usage, message type, and receiver, it is necessary to design a separate listener module -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
