Is there a simple / easy way to add persistence to Spring JavaMailSender and make it work asynchronously? Does Spring provide any "built-in" support for this? I am currently looking at queues with JMS, but they seem redundant for the task (looking at ActiveMQ and RabbitMQ). Is there a simple JMS option?
Your approach with jms okay. Unfortunately, persistence and asynchronous processing are not such an easy task, and you will have to code a bit.
Spring , JMS inbounds - , XML DSL.
- Spring , , , task xml <task:annotation-driven/>. @Async, . , , Spring . , JMS .
task
<task:annotation-driven/>
@Async