C
C#15mo ago
TYoemtais.z

❔ Proper email backround service arch

Hi, need help. I have a booking app in which I will send confirmation emails, thank you emails, reminder emails, etc. I plan to add an email schedule table in the database with information on what the template should be, when to send, etc. I am using Clean Architecture where I have Domain Infrastructure Application and Web. I think I should make the service for sending the email independent of the main application, but I would like it to have access to Domain and Infrastructure to communicate with the database. I was thinking that this service should run in the background and every few minutes check the database to see if there is something to send. Is this a good idea? How do I add a domain link to this service? Through a DLL? Or is it enough to put it next to the domain and the rest or in the same soloution? I want it separarte because main application will be on load balancer but this small service is enough to be on one machine. Thank you.
4 Replies
jcotton42
jcotton4215mo ago
I would look at Hangfire instead of rolling your own background processing
Azrael
Azrael15mo ago
Why would you want to do this?
TYoemtais.z
TYoemtais.zOP15mo ago
I'm rather thinging where should I keep logic for that. It's start to be a little large monolith. But because of clean architecture it's rather loosely tho. Firing rest call to main app you mean?
Accord
Accord15mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server