Skip to content

Producer/consumer apps with additional feature of sending mails using Spring Boot, Spring Kafka, Spring Mail, Spring Cloud/Netflix

Notifications You must be signed in to change notification settings

lampovachan/Email-Sender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Email-Sender-with-Kafka

This repository contains three projects. The first one is common files for both projects, the second one is producer, and the third one is consumer.

Producer uses Spring Boot with Spring Kafka to publish JSON/String message, which contains user mail, to a Kafka topic.

Consumer receives this JSON/String message, which contains mail, from Kafka and sends email on this mail.

Email sending was tested using https://mailtrap.io

To start Zookeeper and Kafka, use this commands:

.\bin\windows\zookeeper-server-start.bat config\zookeeper.properties

.\bin\windows\kafka-server-start.sh config\server.properties

.\bin\windows\kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic NewTopic --from-beginning

Start both producer and consumer projects. Enter app for API testing (such as Postman) and send POST query with body, which contains mail, such as

{
    "mail": "yourmail@gmail.com"
} 

to this adress:

localhost:8081/publish

If everything's OK, the email testing program would show you the email sent on the mail you've notified.

About

Producer/consumer apps with additional feature of sending mails using Spring Boot, Spring Kafka, Spring Mail, Spring Cloud/Netflix

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published