Async Processing Articles
4 articles about Async Processing. Explore Spring Boot implementation, design, and operations across related topics.
-
Implementing Kafka Producer and Consumer in Spring Boot - Beginner's Guide with Sample Code
A practical guide to implementing Kafka Producer and Consumer in a Spring Boot 3.x application from scratch using spring-kafka. Quickly start a broker with Docker Compose, then learn the basics of KafkaTemplate and @KafkaListener, retries and Dead Letter Topic forwarding with DefaultErrorHandler, and testing with @EmbeddedKafka—all explained with a code-centric approach.
-
How to Implement RabbitMQ Producer and Consumer with Spring Boot - AMQP and spring-amqp Basics
A guide to defining RabbitMQ Exchange, Queue, and Binding in code using spring-amqp, and implementing message sending with RabbitTemplate and message receiving with @RabbitListener. Covers dead letter queues, retry configuration, and use case comparisons with Kafka.
-
How to Send Emails with JavaMailSender in Spring Boot - From Gmail/SMTP Configuration to HTML Emails
A zero-to-production guide on sending emails with JavaMailSender. Covers Gmail SMTP configuration, plain text and HTML emails, asynchronous sending with @Async, and troubleshooting common authentication errors — all with practical code examples.
-
How to Implement Asynchronous Processing in Spring Boot - Using @Async and @EnableAsync
An implementation guide for @Async / @EnableAsync, compatible with Virtual Threads in Spring Boot 3.2+ / Java 21. Learn how to speed up your API by running email sending and external API calls in the background, with production know-how covering ThreadPoolTaskExecutor sizing, RejectedExecutionHandler, graceful shutdown, MDC propagation (TaskDecorator), and CompletableFuture, all explained with implementation examples.