views:

133

answers:

1

Does it make sense to use JMS and JavaMail together to build a scalable email solution?

Presently these are the 2 options I am considering:

-- Build a RESTful email center API and call it from all over the web app.

-- Use JMS in between the web app and the email center.

The 'email center' as I call it will probably be implemented using JavaMail. Am I on the right track? Is there some other option that I might have missed?

Is there an advantage using one over the other? I am primarily looking for scalability.

A: 

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.

mjustin