Handle basket deletion failed
Reports Finance's failed basket-cleanup outcome so Order API can soft-delete the affected Order.
DeleteBasketFailedCommand (v1.0.0) is an asynchronous Kafka integration command published by Order OrchestrationServicev1.0.0Order OrchestrationMessage-driven Finance workflow service that coordinates post-checkout basket
cleanup and order notifications using Dura...PublishesPlaceOrderCommand, DeleteBasketCompleteCommand +3SubscribesUserCheckedOutIntegrationEvent, OrderStatusChangedToCompleteIntegrationEvent +3APIsAsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs instructing Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle,
creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs to soft-delete an order whose post-checkout basket cleanup failed or whose orchestration rolled back. Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle,
creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs marks the order deleted without transitioning its business status to Cancelled.
Overview
| Property | Value |
|---|---|
| Bounded Context | Ordering |
| Producer | Order OrchestrationServicev1.0.0Order OrchestrationMessage-driven Finance workflow service that coordinates post-checkout basket cleanup and order notifications using Dura...PublishesPlaceOrderCommand, DeleteBasketCompleteCommand +3SubscribesUserCheckedOutIntegrationEvent, OrderStatusChangedToCompleteIntegrationEvent +3APIsAsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs |
| Consumer(s) | Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs |
| Protocol / Format | Kafka + CloudEvents JSON (camelCase payload) |
| Channel / Topic | Failed Basket Cleanup Command ChannelChannelv1.0.0Failed Basket Cleanup Command ChannelKafka topic owned by the commerce-fulfillment-team carrying Finance's failed basket-cleanup compensation command consume...Ownercommerce-fulfillment-teamOpen docs |
| Dead-Letter Channel | Ordering Dead Letter QueueChannelv1.0.0Ordering Dead Letter QueueKafka dead-letter topic owned by the platform-engineering-team that captures basket-cleanup outcome commands that Order ...Ownerplatform-engineering-teamOpen docs |
| Partition Key | OrderId |
| Delivery / Idempotency Guarantee | At-least-once delivery; consumed with Redis-backed 24-hour idempotency keyed by id |
DeleteBasketFailedCommand is distinct from Basket deletion failedEventv1.0.0Basket deletion failedIndicates that Basket could not delete the submitted basket during checkout
cleanup.
Ownercommerce-fulfillment-teamSchemaDiagramOpen docs. Basket APIServicev1.0.0Basket APIInternal HTTP and gRPC service for managing customer-scoped shopping baskets,
Catalog price enrichment, and post-checkou...PublishesGetBookGrpc, GetBooksGrpc +2SubscribesCreateBasket, UpdateBasket +4APIsOpenAPI, AsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs publishes BasketDeletedFailedIntegrationEvent to Order OrchestrationServicev1.0.0Order OrchestrationMessage-driven Finance workflow service that coordinates post-checkout basket
cleanup and order notifications using Dura...PublishesPlaceOrderCommand, DeleteBasketCompleteCommand +3SubscribesUserCheckedOutIntegrationEvent, OrderStatusChangedToCompleteIntegrationEvent +3APIsAsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs, which then publishes DeleteBasketFailedCommand to Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle,
creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs.
Payload Fields & Envelope
Command Payload
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
id | string (uuid) | Yes | UUIDv7 | Unique message identifier used as the Redis idempotency key |
creationDate | string (date-time) | Yes | ISO 8601 UTC timestamp | UTC timestamp when the command was created |
basketId | string (uuid) | Yes | Valid UUID | Identifier of the basket whose cleanup failed |
email | string | null | Yes | Nullable email string | Customer email address when available (null when unavailable) |
orderId | string (uuid) | Yes | Valid UUID; Kafka partition key | Identifier of the affected order to soft-delete |
totalMoney | number | Yes | Non-negative monetary amount | Total purchase amount associated with the order |
Delivery Guarantees & Error Handling
| Condition | System Behavior | Recovery / Compensation |
|---|---|---|
| Duplicate delivery within 24 hours | Consumer skips reprocessing via Redis-backed 24-hour idempotency keyed by id | Safe at-least-once delivery |
| Order not found or already soft-deleted | Consumer exits cleanly without error | Naturally idempotent no-op |
| Transient database or broker failure | Retried with cooldown (50ms, 250ms, 1s with full jitter) | Exhausted messages route to Ordering Dead Letter QueueChannelv1.0.0Ordering Dead Letter QueueKafka dead-letter topic owned by the platform-engineering-team that captures basket-cleanup outcome commands that Order ...Ownerplatform-engineering-teamOpen docs |
Related Documentation
- Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs — Consuming service, soft-delete filter, and Kafka setup.
- Order OrchestrationServicev1.0.0Order OrchestrationMessage-driven Finance workflow service that coordinates post-checkout basket cleanup and order notifications using Dura...PublishesPlaceOrderCommand, DeleteBasketCompleteCommand +3SubscribesUserCheckedOutIntegrationEvent, OrderStatusChangedToCompleteIntegrationEvent +3APIsAsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs — Producing orchestration service.
- Failed Basket Cleanup Command ChannelChannelv1.0.0Failed Basket Cleanup Command ChannelKafka topic owned by the commerce-fulfillment-team carrying Finance's failed basket-cleanup compensation command consume...Ownercommerce-fulfillment-teamOpen docs — Kafka topic specification.
- Ordering Dead Letter QueueChannelv1.0.0Ordering Dead Letter QueueKafka dead-letter topic owned by the platform-engineering-team that captures basket-cleanup outcome commands that Order ...Ownerplatform-engineering-teamOpen docs — Dead-letter queue for failed Ordering consumers.
- Acknowledge basket deletion completedCommandv1.0.0Acknowledge basket deletion completedReports Finance's successful basket-cleanup outcome to Order API without changing the Order's business status. Ownercommerce-fulfillment-teamSchemaDiagramOpen docs — Companion command for successful basket cleanup.
- Basket deletion failedEventv1.0.0Basket deletion failedIndicates that Basket could not delete the submitted basket during checkout cleanup. Ownercommerce-fulfillment-teamSchemaDiagramOpen docs — Upstream failure event from Basket APIServicev1.0.0Basket APIInternal HTTP and gRPC service for managing customer-scoped shopping baskets, Catalog price enrichment, and post-checkou...PublishesGetBookGrpc, GetBooksGrpc +2SubscribesCreateBasket, UpdateBasket +4APIsOpenAPI, AsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs.
Handle basket deletion failed schema
not allowedUnique identifier assigned to the integration message.
UTC timestamp when the integration message was created.
Identifier of the basket whose cleanup failed.
Customer email, when available.
Identifier of the affected Order.
Total purchase amount associated with the Order.