DeliveryPolicy events.delivery-policy@1
Generated at from
openvibe-contracts v0.79.0 and
openvibe-sdk v0.25.0.
- Version
- 1.0.0
- Owner
- events
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Decision
- ADR-034
- Schema
https://openvibe.network/contracts/events/delivery-policy.v1.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 |
| |
durability | enum | yes |
| |
delivery_semantics | enum | yes |
| |
ordering | object |
| ||
ordering.scope | string | yes | ||
ordering.key | string | yes | ||
latency | object |
| ||
latency.target_p95_ms | number |
| ||
latency.maximum_p95_ms | number |
| ||
retention | object |
| ||
retention.hot | string |
| ||
retention.replay | string |
| ||
retention.archive | string |
| ||
routing | object |
| ||
routing.objective | enum |
| ||
routing.multi_provider | boolean | |||
batching | object |
| ||
batching.max_messages | integer |
| ||
batching.max_delay_ms | integer |
| ||
residency | object |
| ||
residency.inherit_project_region | boolean | |||
residency.region | string | |||
max_payload_bytes | integer |
|
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 }] }