---
title: "events.delivery-policy@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/events.delivery-policy"
updated: null
---

# events.delivery-policy@1 · OpenVibe.Services

HTML: [events.delivery-policy@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/events.delivery-policy)

# DeliveryPolicy `events.delivery-policy@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: events
- Visibility: public
- Status: active
- Compatibility: backward
- Decision: [ADR-034](/docs/adr/ADR-034)
- Schema: [`https://openvibe.network/contracts/events/delivery-policy.v1.json`](/docs/contracts/events.delivery-policy.json)

How an event type is carried (roadmap WS-Z3 task 2): its delivery class sets the minimum semantics, which a publisher's intent may raise and never lower; ordering is per key; the route planner picks the carrier.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `class` | enum | yes |  | - `one of "realtime_ephemeral", "interactive", "interactive_durable", "domain", "critical", "background", "bulk", "webhook"` |
| `durability` | enum | yes |  | - `one of "none", "optional", "required"` |
| `delivery_semantics` | enum | yes |  | - `one of "at_most_once", "at_least_once"` |
| `ordering` | object |  |  | - `no other fields` |
| `ordering.scope` | string | yes |  |  |
| `ordering.key` | string | yes |  |  |
| `latency` | object |  |  | - `no other fields` |
| `latency.target_p95_ms` | number |  |  | - `minimum 0` |
| `latency.maximum_p95_ms` | number |  |  | - `minimum 0` |
| `retention` | object |  |  | - `no other fields` |
| `retention.hot` | string |  |  | - `pattern ^[0-9]+[hdm]$` |
| `retention.replay` | string |  |  | - `pattern ^[0-9]+[hdm]$` |
| `retention.archive` | string |  |  | - `pattern ^[0-9]+[hdmy]$` |
| `routing` | object |  |  | - `no other fields` |
| `routing.objective` | enum |  |  | - `one of "latency_first", "cheapest", "balanced", "correctness"` |
| `routing.multi_provider` | boolean |  |  |  |
| `batching` | object |  |  | - `no other fields` |
| `batching.max_messages` | integer |  |  | - `minimum 1` |
| `batching.max_delay_ms` | integer |  |  | - `minimum 0` |
| `residency` | object |  |  | - `no other fields` |
| `residency.inherit_project_region` | boolean |  |  |  |
| `residency.region` | string |  |  |  |
| `max_payload_bytes` | integer |  |  | - `minimum 1`<br>- `maximum 65536` |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: chat-message

~~~~
{
  "class": "interactive_durable",
  "durability": "required",
  "delivery_semantics": "at_least_once",
  "ordering": {
    "scope": "room",
    "key": "room_id"
  },
  "latency": {
    "target_p95_ms": 50,
    "maximum_p95_ms": 100
  },
  "retention": {
    "hot": "7d",
    "replay": "30d",
    "archive": "365d"
  },
  "routing": {
    "objective": "latency_first",
    "multi_provider": true
  },
  "residency": {
    "inherit_project_region": true
  }
}
~~~~

Valid: page-view

~~~~
{
  "class": "bulk",
  "durability": "optional",
  "delivery_semantics": "at_least_once",
  "latency": {
    "maximum_p95_ms": 30000
  },
  "routing": {
    "objective": "cheapest"
  },
  "batching": {
    "max_messages": 1000,
    "max_delay_ms": 5000
  }
}
~~~~

Rejected: huge-payload

~~~~
{
  "class": "domain",
  "durability": "required",
  "delivery_semantics": "at_least_once",
  "max_payload_bytes": 1048576
}
~~~~

Rejected: unknown-class

~~~~
{
  "class": "fast",
  "durability": "required",
  "delivery_semantics": "at_least_once"
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('events.delivery-policy@1', value);   // { valid, errors: [{ path, message }] }
~~~~
