Given the design of the existing notification API, the performance of sending notification is poor (to terrific). This API is currently used to send all built-in email notification in SonarQube and SonarCloud but we do not need the flexibility this API provides.
We will drop usage of this API for built-in notifications. We will deprecate this API as it is flawed and will continue support it transparently. Whether there will be a replacement has not been decided yet.
This way, it won't run at all unless a non-SonarSource plugin is installed which uses this API and this will fix our performance issue with notification sending.
- notifications are only sent by email
- no notification should be computed if no email server is configured (circuit breaker)
- emails are sent synchronously when processing an analysis report, asynchronously after a UI change
- computation of recipients from subscription stored in DB should be efficient and assume there can be a large number of them
- data is retrieved from DB once per event
- data could be streamed from DB if this is beneficial in memory and performance