O Maestro do Ecossistema: Orquestrando Ordens de Mercado com Kafka, RabbitMQ e Spring Boot
The article discusses the development of the Broker Order API, a central service in a trading ecosystem that orchestrates the lifecycle of market orders. It integrates multiple microservices using technologies like Kafka, RabbitMQ, and Spring Boot to validate, process, and confirm trading transactions. The system follows a well-defined flow from order creation to execution and status notification.
- ▪The Broker Order API acts as the central orchestrator for market orders in the trading ecosystem.
- ▪It communicates with four services using REST, RabbitMQ, and Kafka to validate assets, check balances, execute trades, and notify status changes.
- ▪The order lifecycle includes validation, persistence, execution via B3 Matching Engine, and event broadcasting through Kafka.
- ▪The implementation uses Java 21, Spring Boot 3.3.5, MySQL, Spring Kafka, Spring AMQP, and OpenFeign for inter-service communication.
- ▪An important design decision is the nullable 'executedPrice' field, which is only populated after the Matching Engine returns execution details.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 1452979) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Roberto de Vargas Neto Posted on May 1 O Maestro do Ecossistema: Orquestrando Ordens de Mercado com Kafka, RabbitMQ e Spring Boot #api #architecture #microservices #springboot Olá, pessoal! Chegamos em um dos posts mais importantes da série My Broker B3. Até aqui construímos cada peça do ecossistema separadamente — o sincronizador de preços, o matching engine, a custódia financeira, o catálogo de ativos. Agora é hora de construir o serviço que conecta tudo isso: o Broker Order API.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).