Feed deliveries and recovery
FeedHub publishes three delivery types to topic exchanges. Consume your provisioned snapshot queue with manual acknowledgements. The delivery routing key specifies the sport and phase, with <sportId>.live or <sportId>.prematch. Read the UTF-8 JSON envelope and properties and dispatch the concrete URN.
| Delivery | Exchange | Concrete URN |
|---|---|---|
| Event snapshot | feedhub-event-snapshot-<instance> |
urn:message:FeedHub.Contracts:EventSnapshot |
| Market snapshot | feedhub-market-snapshot-<instance> |
urn:message:FeedHub.Contracts:MarketSnapshot |
| Event index | feedhub-event-snapshot-<instance> |
urn:message:FeedHub.Contracts:EventIndex |
All three payloads carry the same feed fields. schemaVersion is integer 1, messageId is the logical message UUID, and producedAt is the production timestamp. These fields also appear in event resync payloads and each snapshot nested in a catalog or resync reply. Use fetchedAt and the relevant scope and IDs to update state. producedAt can help diagnose delivery age.
Event snapshot
Section titled “Event snapshot”| Payload field | Type and use |
|---|---|
eventId |
UUID. Stable canonical event identity across updates and a prematch-to-live transition. |
fetchedAt |
UTC timestamp of the event poll. Event state version. |
isLive |
Boolean. false for prematch, true once live. |
isFinished |
Boolean, defaults to false. A finished event should leave active use. |
content |
Optional event content object. Terminal deliveries can have null content. |
manifest |
Optional array of { marketId, contentHash } records. Each contains a market UUID and an opaque string matching the corresponding market snapshot hash. A present manifest enumerates the whole event’s markets, including sub-games. |
changedMarketIds |
Optional UUID array of markets expected in snapshots from this poll. A null or omitted array gives no changed IDs. |
The content object carries gameStart (UTC timestamp), sportId and tournamentId (UUIDs), and optional countryId, teamAId, teamBId and prematchEventId (UUIDs). Use catalog lookups for the reference records. A non-null prematchEventId relates a live event to a separate older prematch event ID. The optional kind open enum defaults to Match and also supports Outright and Unrecognized. Outrights can have name (optional string) and no team IDs. scoreFull, scorePeriod, scoreExtra, periodName, extraTime and pitch are optional display strings. timer is an optional integer count of elapsed seconds in the current period.
Example basic.deliver from feedhub-event-snapshot-sandbox, routing key 01967fb0-0a00-7000-8000-000000000001.prematch, AMQP content-type: application/vnd.masstransit+json, delivery-mode: 2 and message-id: 01967fb0-0a00-7000-8000-000000000111. There is no per-message expiry for this snapshot. The queue TTL applies.
{ "messageId": "01967fb0-0a00-7000-8000-000000000111", "messageType": [ "urn:message:FeedHub.Contracts:EventSnapshot", "urn:message:FeedHub.Contracts:FeedMessage" ], "message": { "schemaVersion": 1, "messageId": "01967fb0-0a00-7000-8000-000000000121", "producedAt": "2026-11-30T10:00:00.5Z", "eventId": "01967fb0-0a00-7000-8000-000000000002", "fetchedAt": "2026-11-30T10:00:00Z", "isLive": false, "isFinished": false, "content": { "gameStart": "2026-11-30T11:00:00Z", "sportId": "01967fb0-0a00-7000-8000-000000000001", "tournamentId": "01967fb0-0a00-7000-8000-000000000004", "kind": "Match" }, "manifest": [ { "marketId": "01967fb0-0a00-7000-8000-000000000003", "contentHash": "b4d117e9a02c734e" } ], "changedMarketIds": ["01967fb0-0a00-7000-8000-000000000003"] }}Market snapshot
Section titled “Market snapshot”| Payload field | Type and use |
|---|---|
eventId, tournamentId |
Canonical UUIDs. |
snapshotKey |
UUIDv5, identifies a group of co-published markets within the event. A market’s group can change. Identify an individual market by marketId. |
group |
Optional object with id (UUIDv5) and name (string), used for a sub-game. |
markets |
Array of complete market objects which share the snapshot hash. FeedHub publishes groups with markets in them. |
contentHash |
Opaque string representing the content of the group. Compare with the string in the event manifest. |
fetchedAt |
UTC timestamp of the event or sub-game poll. Market state version. |
full |
Boolean, defaults to false. Full snapshots in a resync or refresh can replace equal-timestamp held market content with a different hash. |
Each market has marketId and marketTypeId (UUIDs), optional name (string), columns (integer), selections (array of rows, each an array of selection objects), and optional splitNumber (positive integer distinguishing markets split from one source market). A selection has selectionId (UUID), optional name (string), value (decimal price string), isSuspended (boolean), optional columnIndex (integer), optional line (decimal string), optional participantId (UUID) and sortOrder (integer). A line is the outcome parameter, for example the threshold of a total or the handicap from that selection’s side. A participant can identify a canonical team or an opaque player ID. Use sortOrder for the feed’s structural selection order. The snapshot gives the entire selection set for each included market. Reconcile replacements by selectionId. Use the event manifest for market removal.
Example basic.deliver from feedhub-market-snapshot-sandbox, routing key 01967fb0-0a00-7000-8000-000000000001.prematch, with the same content type and persistence as the event snapshot.
{ "messageType": [ "urn:message:FeedHub.Contracts:MarketSnapshot", "urn:message:FeedHub.Contracts:FeedMessage" ], "message": { "schemaVersion": 1, "messageId": "01967fb0-0a00-7000-8000-000000000122", "producedAt": "2026-11-30T10:00:00.5Z", "eventId": "01967fb0-0a00-7000-8000-000000000002", "tournamentId": "01967fb0-0a00-7000-8000-000000000004", "snapshotKey": "c5b19524-7782-51fb-8ba2-81b221af6591", "markets": [ { "marketId": "01967fb0-0a00-7000-8000-000000000003", "marketTypeId": "01967fb0-0a00-7000-8000-000000000005", "columns": 2, "selections": [ [ { "selectionId": "01967fb0-0a00-7000-8000-000000000006", "name": "Over", "value": "1.85", "isSuspended": false, "columnIndex": 0, "line": "2.5", "sortOrder": 0 }, { "selectionId": "01967fb0-0a00-7000-8000-000000000007", "name": "Under", "value": "1.95", "isSuspended": false, "columnIndex": 1, "line": "2.5", "sortOrder": 1 } ] ] } ], "contentHash": "b4d117e9a02c734e", "fetchedAt": "2026-11-30T10:00:00Z", "full": false }}Event index
Section titled “Event index”A complete membership list of active events for one sport and phase. List order has no meaning. FeedHub can send an empty index. Managed publication indexes may describe scopes with no eligible events. Some runs can omit ordinary indexes, including an unmanaged run that found no active events across the instance while finished events still exist. Arrival and interval are deployment-dependent.
| Payload field | Type and use |
|---|---|
sportId |
Non-empty canonical UUID. |
isLive |
Boolean selecting the scope’s phase. |
indexedAt |
UTC freshness horizon for comparing held event state. FeedHub normally leaves a safety lag for in-flight catalog writes. A managed scope-only index can use an older sentinel horizon. |
events |
Array of { eventId, fetchedAt } objects with the event UUID and its latest indexed UTC fetch time. |
Example basic.deliver from feedhub-event-snapshot-sandbox, routing key 01967fb0-0a00-7000-8000-000000000001.prematch, content-type: application/vnd.masstransit+json, delivery-mode: 2, and expiration: 60000 for an illustrative 60-second index interval. FeedHub sets an index’s per-message expiry to the configured publishing interval. A shorter queue TTL also applies. In this managed example the AMQP header table mirrors the three strings and carries feedhub-publication-authoritative as the string True.
{ "messageType": [ "urn:message:FeedHub.Contracts:EventIndex", "urn:message:FeedHub.Contracts:FeedMessage" ], "headers": { "feedhub-publication-generation": "generation-example", "feedhub-publication-revision": "revision-example", "feedhub-publication-scope": "01967fb0-0a00-7000-8000-000000000001.prematch", "feedhub-publication-authoritative": true }, "message": { "schemaVersion": 1, "messageId": "01967fb0-0a00-7000-8000-000000000123", "producedAt": "2026-11-30T10:02:00Z", "sportId": "01967fb0-0a00-7000-8000-000000000001", "isLive": false, "indexedAt": "2026-11-30T10:01:00Z", "events": [ { "eventId": "01967fb0-0a00-7000-8000-000000000002", "fetchedAt": "2026-11-30T10:00:00Z" } ] }}Apply and recover feed state
Section titled “Apply and recover feed state”Bootstrap and reference data
Section titled “Bootstrap and reference data”Start consuming the fixed resync queue before bootstrap so replies can arrive during paging. Use reference pages to populate the five reference sets and active-event pages for all subscribed sports and phases to establish event state. Keep the provisioned snapshot queue collecting changes while reading the initial pages, then consume the backlog and apply it with normal freshness checks. Each bootstrap item can supply a manifest without market bodies. Missing or stale entries can trigger HashMismatch requests with the item’s fetchedAt as refFetchedAt. For a catalog bootstrap in a managed deployment, compare a generation-only membership check before and after paging, and restart the read if the generation changes. Re-fetch missing reference IDs in bounded background work. Reference gaps can be resolved separately from event and market state.
Freshness and withdrawal
Section titled “Freshness and withdrawal”FeedHub sends event and market state independently and there is no sequence number. A market snapshot can be processed before its corresponding event snapshot. Compare versions per event or per market, serializing updates on each event ID or using atomic state updates. Duplicate state can be acknowledged without reapplying downstream side effects.
| Condition | Effect on held state |
|---|---|
Event snapshot newer by fetchedAt |
Apply event content and phase. If held state was withdrawn, an active snapshot must be newer than the withdrawal timestamp to restore it. A terminal snapshot can still close the event when it is newer than the held event version. Retain relevant terminal and withdrawal versions for out-of-order messages. |
| Same or older event version | Keep held state. A same-version replay may confirm state already applied. |
Market snapshot newer by fetchedAt |
Replace each supplied eligible market with its full selection set. At equal time, a full: true snapshot with a different hash can replace a non-withdrawn market. For an index-withdrawn event, keep incoming markets at or before the withdrawal timestamp suspended if the manifest permits them. Keep newer held state and acknowledge stale or duplicate deliveries after handling. |
| Present event manifest | Withdraw omitted markets whose held version is at or older than the manifest. An empty array withdraws all such markets. A null or omitted manifest makes no market-list assertion. Older market messages cannot restore a market excluded by a newer manifest. A matching manifest entry can lift an index-based suspension when its timestamp is at least as new as that market. |
| Manifest mismatch | Compare missing or different hashes where the held market is at or older than the event snapshot. Allow changes named in changedMarketIds to arrive first. A mismatch outside that set on an applied event version can trigger a scoped HashMismatch resync. Edge defers hash-driven repairs on lagging deliveries. |
| Market for an unknown event | Apply any configured bounded retry budget while waiting for its event. Edge defaults to zero retries. If the event remains unknown, request a ColdEvent resync and acknowledge the market delivery as handled. Keep the market out of active state until its event is known. |
| Newer index omits a held active event of the same sport and phase | If held.fetchedAt < indexedAt, mark it withdrawn, suspend eligible markets at or before the horizon, and request a ColdEvent resync. A newer index that still omits a withdrawn event can trigger another resync after throttling. Preserve fresher events, finished events and other phases. Use terminal snapshots and settlement deliveries for their corresponding outcomes. |
| Index lists an unknown or stale event | Request repair when configured. Edge uses index-driven repair for prematch, with ColdEvent for unknown events and whole-event HashMismatch for stale events. Edge skips this repair if the index is already too old. Live updates normally repair through subsequent snapshots and resync. |
| Unexpectedly large index withdrawal | Edge can skip ordinary index application when both a configured number and fraction of held events would be withdrawn. Reconcile membership and catalog before destructive cleanup. |
| Unrecognized event kind | Edge skips the event content and its associated market data. Preserve the open-enum behavior and keep unknown kinds out of active use. |
In unmanaged publication, FeedHub also sends a final prematch-key event snapshot for a prematch-to-live transition. Its payload indicates that the event is now live. A prematch-only client should stop presenting it as prematch and avoid exposing live markets outside its subscription. Managed publication uses the eligibility information below.
Publication changes
Section titled “Publication changes”Managed snapshot and index envelopes can carry these application headers. They are in the JSON envelope and are mirrored in the AMQP header table as described in transport and properties.
| Header | Wire type and meaning |
|---|---|
feedhub-publication-generation |
Opaque string identifying the current publication policy view. |
feedhub-publication-revision |
Opaque string identifying the revision for the delivery’s scope. |
feedhub-publication-scope |
String containing the sport and phase routing key. |
feedhub-publication-authoritative |
Boolean true for a managed authoritative index. |
feedhub-publication-hidden |
Boolean true on a resync reply signaling that the event needs revalidation. |
Apply managed state only for eligible IDs, generations and subscribed scopes. When a generation changes, revalidate held events and any candidate events using publication membership. A known hidden event, a scope move or a withdrawal cutoff requires hiding the stale state. A missing or unconfirmed membership check cannot authorize new data. For an authoritative index on the current policy view, check missing IDs against membership. If it lists IDs you do not hold active, read active-event pages for that scope and confirm the generation still matches before applying the page data. Then apply ordinary index freshness and repair. A delayed delivery from an earlier generation cannot revive withdrawn or hidden state. Edge uses an ordinary unmarked index only while the view is unmanaged. Once Edge confirms managed publication, a subsequent membership response without a generation leaves the check unavailable.
Reconnect, delivery loss and acknowledgement
Section titled “Reconnect, delivery loss and acknowledgement”Reconnect to the same assigned queues and recreate consumers and Direct Reply-To as appropriate. Snapshot TTL and overflow can remove changes during a disconnect. Held event versions, index timestamps and manifest hashes expose stale or missing state without a sequence counter. Keep held state across a reconnect where possible, repair through current indexes and targeted resyncs, and use a fresh catalog bootstrap when rebuilding a lost store. An outage long enough to hide every applicable index or a deployment with indexes disabled can require reading current catalog membership. Acknowledge each handled delivery after committing the local result, including valid duplicates, stale updates and deliberate out-of-scope no-ops. An uncommitted delivery can be redelivered after a channel failure. Match its new delivery tag on the current channel.
For known snapshot or resync response types, Edge 1.0.0 reads exactly schema 1. In its snapshot and resync queues Edge routes unreadable known schema or malformed data to <queue>_error. An unknown URN with a readable version at or below 1 goes to <queue>_skipped, while an unknown type with a higher version faults. A direct client should report unsupported or malformed input and use its configured quarantine or retry handling before discarding broker data. These Edge queue conventions do not require a raw client to declare extra queues. Settlements use a different acknowledgement policy.