一起使用 JMS 和 JavaMail 来构建可扩展的电子邮件解决方案是否有意义?
目前这些是我正在考虑的两个选项:
-- 构建一个 RESTful 电子邮件中心 API 并从整个 Web 应用程序调用它。
-- 在 Web 应用程序和电子邮件中心之间使用 JMS。
我称之为“电子邮件中心”可能会使用 JavaMail 实现。我在正确的轨道上吗?还有其他我可能错过的选择吗?
使用一个比另一个有优势吗?我主要是在寻找可扩展性。
一起使用 JMS 和 JavaMail 来构建可扩展的电子邮件解决方案是否有意义?
目前这些是我正在考虑的两个选项:
-- 构建一个 RESTful 电子邮件中心 API 并从整个 Web 应用程序调用它。
-- 在 Web 应用程序和电子邮件中心之间使用 JMS。
我称之为“电子邮件中心”可能会使用 JavaMail 实现。我在正确的轨道上吗?还有其他我可能错过的选择吗?
使用一个比另一个有优势吗?我主要是在寻找可扩展性。
JMS will provide persistent storage, load balancing, and guaranteed delivery out of the box. A RESTful API would have to implement these core services from scratch.
Of course you can use the RESTful API and in the REST Servlet use a JMS client to publish the mail data to a queue. This would remove JMS API dependencies from the calling sites. But either way, wrapping the complete mail instance in a REST and/or JMS message needs to be implemented.