Email configuration cannot be changed at runtime #1232
Labels
defect
Something isn't working
domain/notifications
p2
Non-critical bugs, and features that help organizations to identify and reduce risk
size/M
Medium effort
Current Behavior
We currently use the
quarkus-mailer
extension to send emails in the notification-publisher.The configuration of
Mailer
cannot be changed dynamically at runtime. Instead, it is initialized once on startup. https://stackoverflow.com/questions/70090456/how-to-change-mail-config-quarkus-at-runtimehyades/notification-publisher/src/main/resources/application.properties
Lines 69 to 77 in e517e93
As part of #929, we need to support modifications to the email configuration via UI. This means that the configuration must reload while the application is running.
The Quarkus
Mailer
uses Vert.xMailClient
behind the scenes. We might need to constructMailClient
instances at runtime. The Vert.x docs show how it can be done:The docs also mention connection pooling:
This means it could be too expensive to construct a new client for every notification. We will need to find a way to cache
MailClient
instances until the underlying configuration changes.Steps to Reproduce
N/A
Expected Behavior
The email configuration should be configurable via UI.
Hyades Version
0.5.0-SNAPSHOT
Repository Type
Hyades services
Browser
N/A
Checklist
The text was updated successfully, but these errors were encountered: