Microservices Articles
6 articles about Microservices. Explore Spring Boot implementation, design, and operations across related topics.
-
Implementing the Transactional Outbox Pattern in Spring Boot
This article explains how to implement the Transactional Outbox pattern in Spring Boot to solve the dual-write problem between DB updates and Kafka messaging. It covers Outbox table design, relay via Poller, and comparison with Debezium CDC, complete with working code.
-
How to Implement Distributed Transactions in Microservices with the Saga Pattern in Spring Boot
A guide to implementing distributed transactions across microservices using the Saga pattern with Spring Boot + Kafka. Covers selection criteria for Choreography vs Orchestration types, compensating transaction design, and ensuring idempotency, complete with implementation code.
-
How to Implement Declarative External API Calls with OpenFeign in Spring Boot
A comprehensive implementation guide covering everything from adding the spring-cloud-openfeign dependency and defining @FeignClient interfaces to error handling, timeout configuration, and logging settings. Aimed at developers frustrated by RestTemplate/WebClient boilerplate.
-
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 Implement Circuit Breaker with Resilience4j in Spring Boot - Spring Boot 3.x Guide
Learn how to implement circuit breakers in Spring Boot 3.x using Resilience4j, the successor to Hystrix. This guide covers how to use @CircuitBreaker, @Retry, @RateLimiter, Bulkhead, and TimeLimiter, fallback design, parameter tuning in application.yml, and state monitoring with Actuator, all with practical code examples.