This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using Spring+RabbitMQ for reliable email send?

 
atul khot
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
atul khot
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic