Orders — event contract
binding spec asyncapi/orders.asyncapi.yaml @ 3.0.0 is the spec of record. It states what must be; implementations converge on it, never the reverse.
Enforced by
- any change must bump the artifact and service versions (
check:version); a silent edit fails CI - a breaking change must take a major version (
check:compat) - Spectral lint, house naming rules included
- Microcks contract tests hold mocks and implementations to these messages
Version history
| Version | First released | Service version |
|---|---|---|
3.0.0 | 2026-08-27 | 3.0.0 |
2.1.0 | 2026-08-24 | 2.1.0 |
2.0.0 | 2026-08-23 | 2.0.0 |
1.5.0 | 2026-08-23 | 1.0.0 |
Consume it
- Agents, over MCP:
get_artifact('orders', 'asyncapi/orders.asyncapi.yaml') - Raw spec:
asyncapi/orders.asyncapi.yaml - Implementations pin the release tag
orders/v3.4.0in theircontracts.lockand fetch read-only; the full loop is on Drive an implementation.
orders.placed.v2
Emitted when an order is accepted and persisted.
Produced by Orders — consumed by Payments.
sequenceDiagram
autonumber
participant orders as Orders
participant chan as orders.placed.v2
participant payments as Payments
orders-)chan: OrderPlaced
Note right of chan: com.hungovercoders.orders.placed.v2
chan--)payments: OrderPlacedExample events (Microcks fixtures)
placed
{
"specversion": "1.0",
"id": "aaaaaaaa-1111-4111-8111-aaaaaaaaaaaa",
"source": "/orders",
"type": "com.hungovercoders.orders.placed.v2",
"subject": "11111111-1111-1111-1111-111111111111",
"time": "2026-08-23T09:00:00Z",
"datacontenttype": "application/json",
"data": {
"order_id": "11111111-1111-1111-1111-111111111111",
"customer_id": "22222222-2222-2222-2222-222222222222",
"placed_at": "2026-08-23T09:00:00Z",
"total_pence": 2500
}
}orders.cancelled.v2
Emitted when an order is cancelled, with the reason.
Produced by Orders — no consumer in the specs yet.
sequenceDiagram
autonumber
participant orders as Orders
participant chan as orders.cancelled.v2
orders-)chan: OrderCancelled
Note right of chan: com.hungovercoders.orders.cancelled.v2
Note over chan: no consumer in the specs yetExample events (Microcks fixtures)
cancelled
{
"specversion": "1.0",
"id": "bbbbbbbb-2222-4222-8222-bbbbbbbbbbbb",
"source": "/orders",
"type": "com.hungovercoders.orders.cancelled.v2",
"subject": "33333333-3333-3333-3333-333333333333",
"time": "2026-08-23T09:05:00Z",
"datacontenttype": "application/json",
"data": {
"order_id": "33333333-3333-3333-3333-333333333333",
"cancelled_at": "2026-08-23T09:05:00Z",
"reason": "customer_request"
}
}