We now have put in place an account service administration : its reponsability is to let a consumer register is account, affirm his e mail, and so forth…
We now have put additionally in place a course of layer that’s reponsible to inform the consumer when his account is altered.
The notifications are executed by a notification service that’s decoupled from our account service and that notify the consumer based mostly on an occasion mechanism.
Right here is an summary of the precept :
As a brand new requirement, our buyer needs us now to ship , for any notification, a reminder each 2 hours to the consumer.
For instance if the account just isn’t but confirmed , we are going to ship the consumer a notification by e mail askin him to verify his account 2 hours later…
The staff in charger of the UserNotification service, suppose that it is not their responsability to deal with this as a result of they’ve a stateless course of and have no idea in regards to the account standing for instance.
In order that they ask that the account administration service ought to increase an occasion “AccountStillNotConfirmed” to ask for the notification each two hours :
The choice is to make the usernotification statefull, or at much less make it asks the account service for the record of “not but affirm account” each two hours and ship a notification if wanted.
The occasion “AccountStillNotConfirmed” appears odd to me.
I’m in the hunt for probably the most clear approach to sort out this downside.
which structure can be preferable for you and why ?
Is there one other various approach to staisfy our buyer want?