From Stream to Database: Processing Market Data with Spring Boot, Redis, and Flyway
Hello everyone! In my last post, we saw how our Python service collects B3 data and publishes it to Kafka. Today, we take a crucial step: consuming this data and making it useful for our brokerage ...

Source: DEV Community
Hello everyone! In my last post, we saw how our Python service collects B3 data and publishes it to Kafka. Today, we take a crucial step: consuming this data and making it useful for our brokerage ecosystem. I’ll introduce the Broker Asset API, the Java microservice responsible for managing the asset catalog, keeping prices updated, and serving this information with ultra-low latency. 🎯 MVP Focus (Minimum Viable Product) Before diving into the code, a quick disclaimer: we are building the foundation. At this stage, the goal is to ensure the end-to-end flow works seamlessly. The focus is on delivering core value: making data available and performant. In the future, we will revisit this service to add unit tests, refine exception handling, and increase resilience. 🏗️ The Pillars of the Asset API For this MVP, I focused on four main implementation points: 1. Database Evolution with Flyway To ensure our MySQL schema is versioned and reproducible, I used Flyway. We created the assets tabl