Skip to content

Software Development at Program Tom LTD

Place for coding, programming, development and software in general.

Menu
  • Blog
  • PDF Booklets
  • Dev Utils & Content
  • Java Spring Boot Or Web Apps
  • English
    • български
    • English
    • Español
    • Português
    • हिन्दी
    • Русский
    • Deutsch
    • Français
    • Italiano
    • العربية
  • About Us
Menu

Email Sender Micro Service Kafka Consumer [Source Code]

Email Sender Micro Service

$4.99

Categories: Java, Spring (Boot) / Quarkus, Vaadin 24+
  • Description

Description

This package contains [Source Code] of a Email Sender Micro Service Web Application that has an administrative interface and is open for new emails as a Kafka Consumer.

Email Sender Web App

There are two ways this app could be packaged

  • as a jar and executed in docker
  • or as war and deployed in java servlet/web container.

The difference in the source code is in:

  • The Application.java: 
    - public class Application implements AppShellConfigurator { //for jar
    - public class Application extends SpringBootServletInitializer { // for war
  • in the pom.xml –
    <packaging>war</packaging> - for web app
    and
    <packaging>jar</packaging> for - micro service jar.

Package the Email Sender Micro Service as Jar – Docker Image

This is the default mode of execution.

  • using Maria DB as Database
  • auto-generate db scheme
  • simple CRUD interface over the send mails
  • work in progress unit tests
  • docker file & setup. If you would like to run it outside docker – just change the configuration from
    host.docker.internal to localhost

Prerequisite so the Email Sender Micro Servic could function

  • Setup your SMPT settings in MailSenderApplication
JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
mailSender.setHost("mail.atyourplace.com");
mailSender.setUsername("sendingaccount@atyourplace.com");
mailSender.setPassword("password")
  • Create a DB scheme “mail” in MariaDB and update the credentials
  • Start the micro-service – preferebly in Docker container

Sending emails

This application consumes Kafka Messages Asynchroniously. Update the server where kafka is located in the application.properties:

kafka.address=localhost:9092

Besides that:

  • the topics are “site_monitor_mail_messages”,
  • and the groupId is “mail_messages”

The Body of the Kafka Message is a String with encoded JSON Object with fields

  • fromMail;
  • toMail;
  • subjectOfTheMail;
  • textOfTheMail;

Web Admin Interface

The Micro Service has Web Admin Interace http://localhost:8701/emails_manager_app (or emails_manager_app-1.0-SNAPSHOT if the generated war is deployed).

There is hard-coded login as – it is intended to be hidden in your local network, but you could easily extend it and add your authentication.

blank

There is a basic pagination view with the list of send mail messages.

blank And a basic add/edit/view screen. You will most likely be used for display only in real use case.

blank

Product Packaging

You will receive emails_manager_app source code. You could build it with

mvn clean package -Pproduction -Dvaadin.force.production.build=true

and package it to image with the Dockerfile + the command –

docker build --build-arg JAR_FILE=target/*.jar -t com.programtom.emails_manager_app/Application. The command are included as scripts.

Related products

  • Tomcat Access Log Analyzer v2 

    Tomcat Access Log Analyzer v2 

    $49.99
    Add to cart
  • File Waiter

    File Waiter – Serve or Upload Files Between a Computer & Other Devices

    $0.99
    Add to cart
  • Hashing Spring Boot Micro Service

    Hashing Spring Boot Micro Service

    $4.99
    Add to cart
  • Application Level - IP White List - Micro Service

    Application Level – IP White List – Micro Service

    Read more
  • Prompt-to-Production: How AI is Forcing Us to Build Higher Quality Software
  • Debug Web View Flutter App
  • Skipping AI? You’re a Relic – Time to Evolve or Perish!
  • 2026 Flutter Launch Blueprint: Your 10-Step Checklist to App Store Domination
  • Product Requirements Document – for different software development levels

Categories

  • Apps (25)
  • ChatGPT (27)
  • Choosing a Framework (38)
  • Flutter (281)
  • Graphical User Interface (14)
  • Marketing (119)
  • Software Development (292)
  • Spring (45)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (16)

Tags

Algorithms (9) crypto (29) flutterdev (39) General (86) Java (7) QR & Bar Codes (3) Software Dev Choices (33) Spring Boot (1) standards (1) Theme (3) User Authentication & Authorization (9) User Experience (10) Utilities (19) WordPress (11)

Product categories

  • All Technologies (87)
    • Flutter Apps (26)
    • GPT (4)
    • Java (39)
    • Native Android (3)
    • PHP (9)
    • Spring (Boot) / Quarkus (36)
    • Utils (15)
    • Vaadin 24+ (28)
    • Vaadin 8 (1)
  • Apps (18)
    • Employees DB (1)
    • Notes (6)
    • Personal Budget (1)
    • Recipes Book (1)
    • Stuff Organizer (1)
    • To-Do (2)
  • PDF Books (3)
  • Source Code Generators (8)

Recent Posts

  • Prompt-to-Production: How AI is Forcing Us to Build Higher Quality Software
  • Debug Web View Flutter App
  • Skipping AI? You’re a Relic – Time to Evolve or Perish!
  • 2026 Flutter Launch Blueprint: Your 10-Step Checklist to App Store Domination
  • Product Requirements Document – for different software development levels

Post Categories

  • Apps (25)
  • ChatGPT (27)
  • Choosing a Framework (38)
  • Flutter (281)
  • Graphical User Interface (14)
  • Marketing (119)
  • Software Development (292)
  • Spring (45)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (16)