Node store-and-forward replay batch for reconnect catch-up. batchId MUST be retry-stable for the same durable ordered event cut. Event identities MUST NOT be rewritten by attempt/replay metadata.
| Field | Value |
| Identifier | urn:obsp:schema:v3.1:replaybatch |
|---|
| Dialect | https://json-schema.org/draft/2020-12/schema |
|---|
| Used by functions | Observe |
Properties
| Property | Required | Type | Description |
schemaVersion | yes | reference | |
claim | yes | string | Batch is a transport of Node-local durable facts; not Fleet or institutional authority. |
batchId | yes | string | Retry-stable identity for this ordered durable cut (deterministic digest or durable persisted id). |
nodeUni | yes | reference | |
tenantUni | yes | reference | |
workspaceUni | yes | reference | |
firstSequence | no | integer | |
lastSequence | no | integer | |
attempt | no | integer | Transmission attempt counter; MUST NOT alter eventId or payloadDigest. |
correlationId | no | string | |
events | yes | array | |
extensions | no | reference | |
Positive fixtures
Negative fixtures
replay-batch.missing-batch-id.json: required at /: 'batchId' is a required property
Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:obsp:schema:v3.1:replaybatch",
"title": "ReplayBatch",
"description": "Node store-and-forward replay batch for reconnect catch-up. batchId MUST be retry-stable for the same durable ordered event cut. Event identities MUST NOT be rewritten by attempt/replay metadata.",
"type": "object",
"required": [
"schemaVersion",
"batchId",
"nodeUni",
"tenantUni",
"workspaceUni",
"events",
"claim"
],
"properties": {
"schemaVersion": {
"$ref": "#/$defs/SchemaVersion"
},
"claim": {
"type": "string",
"const": "REPLAY_BATCH_NOT_AUTHORITY",
"description": "Batch is a transport of Node-local durable facts; not Fleet or institutional authority."
},
"batchId": {
"type": "string",
"minLength": 16,
"maxLength": 256,
"description": "Retry-stable identity for this ordered durable cut (deterministic digest or durable persisted id)."
},
"nodeUni": {
"$ref": "#/$defs/Uni"
},
"tenantUni": {
"$ref": "#/$defs/Uni"
},
"workspaceUni": {
"$ref": "#/$defs/Uni"
},
"firstSequence": {
"type": "integer",
"minimum": 0
},
"lastSequence": {
"type": "integer",
"minimum": 0
},
"attempt": {
"type": "integer",
"minimum": 1,
"description": "Transmission attempt counter; MUST NOT alter eventId or payloadDigest."
},
"correlationId": {
"type": "string",
"minLength": 8,
"maxLength": 128
},
"events": {
"type": "array",
"minItems": 1,
"maxItems": 256,
"items": {
"$ref": "#/$defs/ReplayEvent"
}
},
"extensions": {
"$ref": "#/$defs/Extensions"
}
},
"additionalProperties": false,
"$defs": {
"SchemaVersion": {
"type": "string",
"const": "3.1.0"
},
"Uni": {
"type": "string",
"minLength": 8,
"maxLength": 256,
"pattern": "^[A-Za-z0-9][A-Za-z0-9:._/@-]{7,255}$"
},
"Digest": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9._-]{1,31}:[A-Fa-f0-9]{32,128}$"
},
"IsoDateTime": {
"type": "string",
"format": "date-time"
},
"Extensions": {
"type": "object",
"propertyNames": {
"pattern": "^[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)+$"
},
"additionalProperties": true
},
"ReplayEvent": {
"type": "object",
"required": [
"eventId",
"eventType",
"schemaVersion",
"payloadDigest",
"payload",
"recordedAt"
],
"properties": {
"eventId": {
"type": "string",
"minLength": 8,
"maxLength": 128
},
"eventType": {
"type": "string",
"pattern": "^observatory\\.[a-z0-9]+(\\.[a-z0-9]+){1,6}$"
},
"schemaVersion": {
"$ref": "#/$defs/SchemaVersion"
},
"sequence": {
"type": "integer",
"minimum": 0
},
"correlationId": {
"type": "string",
"minLength": 8,
"maxLength": 128
},
"causationId": {
"type": "string",
"minLength": 8,
"maxLength": 128
},
"payloadDigest": {
"$ref": "#/$defs/Digest"
},
"recordedAt": {
"$ref": "#/$defs/IsoDateTime"
},
"payload": {
"type": "object",
"description": "For observed-state replay, payload is ObservedStateReceipt.",
"additionalProperties": true
}
},
"additionalProperties": false
}
}
}