Today I needed to implement a method to send a notification email after the registration progress. With the actual logic my application was taking too long during the process. So I decide to make the mail sending asynchronous.
First I tried the JMS, the old school Java Message Service API, but I realized that is not that gold, just old.
So after few googling I found a post of Dan Vega, a SpringBoot guru who has courses on Udemy.
With this post I realized: spring make our lives too easy, indeed.
Tow annotations make the method asynchronous, @Async and @EnableAsync.
Here is the post.