Message Types
Session lifecycle
Section titled “Session lifecycle”CLIENT_SETUP (0x20)
Section titled “CLIENT_SETUP (0x20)”| Field | Type | Description |
|---|---|---|
| Number of Supported Versions | varint | Count of version entries |
| Supported Versions | varint[] | Draft version identifiers |
| Number of Parameters | varint | Setup parameter count |
| Parameters | KVP[] | Key-value setup parameters |
SERVER_SETUP (0x21)
Section titled “SERVER_SETUP (0x21)”| Field | Type | Description |
|---|---|---|
| Selected Version | varint | Negotiated draft version |
| Number of Parameters | varint | Setup parameter count |
| Parameters | KVP[] | Key-value setup parameters |
GOAWAY (0x10)
Section titled “GOAWAY (0x10)”| Field | Type | Description |
|---|---|---|
| New Session URI | bytes | URI for the new session |
Subscription
Section titled “Subscription”SUBSCRIBE (0x03)
Section titled “SUBSCRIBE (0x03)”| Field | Type | Description |
|---|---|---|
| Request ID | varint | Client-assigned request ID (even) |
| Track Alias | varint | Client-assigned track alias |
| Track Namespace | tuple | Namespace components |
| Track Name | bytes | Track name within namespace |
| Subscriber Priority | uint8 | Priority hint |
| Group Order | uint8 | Ascending (1) or descending (2) |
| Filter Type | varint | LatestObject, NextGroupStart, etc. |
| Parameters | KVP[] | Subscription parameters |
SUBSCRIBE_OK (0x04)
Section titled “SUBSCRIBE_OK (0x04)”| Field | Type | Description |
|---|---|---|
| Request ID | varint | Matching request ID |
| Expires | varint | Subscription expiry (0 = never) |
| Largest Group | varint | Largest available group ID |
| Largest Object | varint | Largest object in largest group |
SUBSCRIBE_ERROR (0x05)
Section titled “SUBSCRIBE_ERROR (0x05)”| Field | Type | Description |
|---|---|---|
| Request ID | varint | Matching request ID |
| Error Code | varint | Error code |
| Reason Phrase | bytes | Human-readable error description |
FETCH (0x16)
Section titled “FETCH (0x16)”| Field | Type | Description |
|---|---|---|
| Request ID | varint | Client-assigned request ID |
| Subscriber Priority | uint8 | Priority hint |
| Group Order | uint8 | Ascending or descending |
| Track Namespace | tuple | Namespace components |
| Track Name | bytes | Track name |
| Start Group/Object | varint | Range start |
| End Group/Object | varint | Range end |
| Parameters | KVP[] | Fetch parameters |
Common parameters
Section titled “Common parameters”| Parameter | ID | Description |
|---|---|---|
| AUTHORIZATION TOKEN | 0x03 | Auth token for the subscription |
| DELIVERY TIMEOUT | 0x02 | Max delivery time in ms |
| MAX_CACHE_DURATION | 0x04 | Max cache time in ms |