---
url: >-
  https://game-engine-io.github.io/enginex-frontend-sdk/reference/api/@getenginex/sdk/extension/interfaces/TopicDefinition.md
---
[Reference](../../../../index.md) / [@getenginex/sdk/extension](../index.md) / TopicDefinition

# TopicDefinition\<TWire, TMessage>

Definition of a realtime topic, for [defineTopic](../functions/defineTopic.md). Meant for SDK packages (the core
defines `balance`/`notification`; `sdk-predictions`, those of markets and orders).

## Type Parameters

### TWire

`TWire`

### TMessage

`TMessage`

## Properties

### messageType

> `readonly` **messageType**: `string`

Type of this topic's data messages on the wire, e.g. `'balance_update'`.

***

### prefix

> `readonly` **prefix**: `string`

Topic prefix at the gateway, without the trailing `:`, e.g. `'balance'`, `'predictions:orderbook'`.
The full topic is `${prefix}:${id}`.

***

### private

> `readonly` **private**: `boolean`

`true` for the user's own topics (`balance`, `notification`, `predictions:orders`): the
descriptor takes no id and realtime uses the session's `sub`. `false` for public topics
(`market`, `predictions:orderbook`...), whose descriptor requires the id.

***

### schema

> `readonly` **schema**: [`WireSchema`](WireSchema.md)<`TWire`, `TMessage`> | (() => [`WireSchema`](WireSchema.md)<`TWire`, `TMessage`>)

Payload schema (see [WireSchema](WireSchema.md)), or a function that returns it (e.g. a `lazy(...)`),
so that the schema is only built on the first subscription.

***

### snapshots?

> `readonly` `optional` **snapshots?**: `"deliver"` | `"ignore"`

What to do with the sequenced mode `snapshot`s (single-tenant only): `'deliver'` (default) validates
and delivers like any message; `'ignore'` neither delivers nor reports a validation problem (the
topic's `seq` advances normally and the `delta`s keep arriving). Use `'ignore'` when the
gateway's snapshot has a different format from the topic's messages, as in `balance` (the snapshot
is the raw `GetBalance` protobuf).
