aspose file tools*
The moose likes Spring and the fly likes Using Spring+RabbitMQ for reliable email send? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Using Spring+RabbitMQ for reliable email send?" Watch "Using Spring+RabbitMQ for reliable email send?" New topic
Author

Using Spring+RabbitMQ for reliable email send?

atul khot
Ranch Hand

Joined: Jul 24, 2008
Posts: 50
Dear all,
Greetings...

One of our needs is when an event happens - we need to send a message
(right now email message - but FAX / SMS etc... to be added soon).
The requirement is that this mechanism should be robust... if the mail delivery failed -
it should be retried...
(Also the first cut we have now calls Java Mail API - as this is a synchronous call - things look kind of sluggish).

I started looking at the docs - and came up with the following:

1. Instead of interfacing directly with the Java mail service - hand it over to the RabbitMQ server... (send it to a queue)
(use Spring AMQP support)
2. We can write a consumer that picks up the message from the queue - this consumer would then call java mail api
(take the onus of mail delivery)
3. Not sure how we can completely address the reliability concern
4. However, the call would be asynchronous now - hence production code would be fast...

Am I doing right? - any thoughts for improvement most welcome...

Thanks guys for this wonderful forum...

--- atul


--cheerio atul
atul khot
Ranch Hand

Joined: Jul 24, 2008
Posts: 50
Is this question already answered in the docs?

I see mail support in Spring Integration -

With respect to what I wrote earlier - is this the right way to go - or is there anything already in Spring?

- thanks atul
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using Spring+RabbitMQ for reliable email send?