2

I have four db servers with the same db structure but different data. Currently when new data are inserted to database my application get this data, create template and send email.

I would like to separate sending email from my applications. For example some thread which will start once per 10 minutes. It selects data from my four db servers, connect to mail server and send email to users.

It's possible with using JMS or something similar ?

Thanks for replys !

tomgal
  • 136
  • 2
  • 9

1 Answers1

0

I did the same by creating a mail table (likely one per DB) and save the Template and data (or subject/body) in it. A separate process could be Quartz or your own pooling thread read that table and connect to mail server and send email and update email status.

In this way you can check status of any email at any given time and even you can resend any email. The table needs to purge/archive after some time may be after 1 day or 1 week depends on table size.

maaz
  • 4,371
  • 2
  • 30
  • 48
  • Hi i have the similar scenario . can you pls post your ideas http://stackoverflow.com/questions/26037098/ways-to-improve-the-performance-of-this-scenario – Santhosh Sep 29 '14 at 10:36