-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Open
Labels
Description
Description
NOTIFIER DOCUMENTATION IMPROVEMENT
Description
I suggest adding a piece of documentation to the Notifier component about the following situation I faced in a real commercial project.
Situation
Client gets the same notification several times (3-15 times, depends on failure configuration transport).
What happens?
One notification sends to many channels (email, telegram, sms)
Steps:
- telegram and sms are successfully sent except email (SMTP error)
- Notification sent to the failure transport
- Sends again, again telegram and sms are successfully sent except email (SMTP error)
- [Loop] until notification will be removed from the failure transport
My solution (maybe to add this solution in the docs)
- Use RabbitMQ, send notifications to "fanout" exchange:
notification
-> telegram_queue (a separate consumer for the telegram_queue)
-> sms_queue (a separate consumer for the sms_queue)
-> email_queue (a separate consumer for the email_queue) - Use a custom serializer to decode notification and set channels depending on queue name
For example:
sms_queue sets only sms channel of Notification...
and so on - Run workers.
Maybe my solution is not easy as needed...
At any rate, this problem exists and I faced it in a real project.
I hope we'll find a solution how to avoid this together.