← Alle Projekte

Order Store

Asynchrone Bestellverarbeitung: Bestellungen werden in MongoDB gespeichert und an RabbitMQ gesendet, wo ein Hintergrunddienst den Bestand atomar reserviert, mit einer Dead-Letter-Queue für fehlgeschlagene Nachrichten.

Quellcode

Overview

Order Store is an order-processing system built around asynchronous messaging. Placing an order and reserving stock are handled as separate steps, connected through a message queue.

The challenge

When many orders arrive at the same time, processing everything inside a single web request makes the API slow, and two orders can reserve the same stock. Failed messages must not simply disappear.

How I solved it

Tech

Technologien