The next step of building our system is the email service. It will be a microservice configured to listen for the USER_CREATED_TOPIC that comes from the user service. Here we will build a UserDto and configure the Kafka consumer to transform the incoming payload to it. Similarly to the user microservice, here we will have an EmailService where the business logic will be executed. This EmailService will be using the UserDto from the payload, transform it to a Mail entity, save it in the database, and send the mail.
In addition to Eureka Discovery; JPA; H2; Kafka; Config Client; to the new Spring Boot project(ms-mail) in SPRING INITIALIZR, it is necessary to add aMail dependency as well. So the pom.xml looks like: https://goo.gl/ja3zDs #DataIntegration #ML
Share this:
- Click to share on Facebook (Opens in new window)
- Click to share on Twitter (Opens in new window)
- Click to email a link to a friend (Opens in new window)
- Click to share on LinkedIn (Opens in new window)
- Click to share on Tumblr (Opens in new window)
- Click to share on Pinterest (Opens in new window)
- Click to share on Reddit (Opens in new window)