Microservices Articles
9 articles about Microservices. Explore Spring Boot implementation, design, and operations across related topics.
-
How to Implement gRPC Services and Clients in Spring Boot - Protocol Buffers and grpc-spring-boot Support
A hands-on guide to implementing gRPC in Spring Boot, covering dependency setup, code generation from .proto files, server implementation with @GrpcService, client calls with @GrpcClient, error conversion, authentication/logging via interceptors, and how to choose between REST and GraphQL.
-
How to Build an API Gateway with Spring Cloud Gateway - Routing, Filters, and Rate Limiting
A practical guide to building an API Gateway that sits in front of microservices with Spring Cloud Gateway. This hands-on tutorial covers route definitions, path rewriting, authentication and logging with GlobalFilter, RequestRateLimiter with Redis integration, and fallback integration with Resilience4j.
-
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.
-
Introducing Distributed Tracing with Micrometer Tracing and Zipkin in Spring Boot 3.2+
A step-by-step guide to introducing distributed tracing with Micrometer Tracing and Zipkin in Spring Boot 3.2 and later. Covers the migration path after Spring Cloud Sleuth was discontinued, trace ID propagation between services, and how to verify traces in the Zipkin UI.
-
How to Implement a Circuit Breaker with Resilience4j in Spring Boot - A Guide for Spring Boot 3.x
Learn how to implement a circuit breaker in Spring Boot 3.x using Resilience4j, the successor to Hystrix. This guide covers @CircuitBreaker, @Retry, @RateLimiter, Bulkhead, and TimeLimiter usage, fallback design, parameter tuning in application.yml, and checking state via Actuator, all with practical code examples.