From the eShop (AdventureWorks), mapped as three services architecture map

RabbitMQ status handlers skip the idempotency check HTTP commands get

observation · medium · verified

Every RabbitMQ event handler in Ordering API sends its status command straight to MediatR and skips the IdentifiedCommand wrapper that HTTP requests get. SetPaidIdentifiedOrderStatusCommandHandler exists to ignore duplicates, but nothing sends it. The same is true for SetStockConfirmed, SetStockRejected and SetAwaitingValidation. A redelivered payment, stock or grace-period message runs a status change that was already applied.

Impact: A redelivered event from the payment, catalog or grace-period worker silently repeats an order status transition, with no idempotency check to stop it.

Recommendation (medium effort): Route each integration-event handler's status command through its existing Identified*OrderStatusCommandHandler (keyed by the event id) instead of calling mediator.Send on the bare command, the way OrdersApi already does for HTTP.

The trail

  1. Catalog Service
  2. RabbitMQ Event Bus
  3. Order Processor (grace period)
  4. Ordering API
  5. Payment Processor
Open on the map

More from this board