Clear Liquibase checksum on upgrade

overview Recently, I upgraded from spring 3.5 to 4. It went quite smoothly thanks to openrewrite script. There are some hiccups of course (with jackson objectmapper, custom deserializer) but thanks to Claude, those are solved quite quickly. One strange thing is that liquibase checksum changed. Many past migrations failed due to this error (I don’t … Read more

Guide To ReentrantLock

Java gives you more than one way to coordinate access to shared state. Most developers start with synchronized and never look further — but understanding the full lock landscape, especially ReentrantLock, unlocks (pun intended) a set of capabilities that can be critical for production-grade concurrent code. This post covers the full picture: from the JVM … Read more

Enable Colors For Logs With Logback Spring

Overview Checking log without color is hard. Enable color for your log messages would make things a bit easier. I’ll show you how to do that with logback in spring. Configuration First of all, you need to create a file name logback-spring.xml under your resource folder. Here is my file: Here is my log configuration … Read more

Building a Distributed Online Store with Spring Boot, RabbitMQ, and OpenTelemetry

In this post, we’ll walk through the architecture and implementation of a simple microservices-based online store built with: Microservices Architecture Our online store is made up of the following services: Service Responsibility catalog-service Manages products (name, price) order-service Handles orders, triggers workflow events inventory-service Reserves stock when an order is placed payment-service Simulates payment processing … Read more

Spring Boot SSE With SNS, SQS and S3

Overview A classic pattern in web applications is that the user requests something that is not immediately available, your app then does a heavy computation and returns the result to the user. However, since the task is long-running, you cannot make the user wait for the result. One of the easiest ways is to email … Read more