Skip to content

documentTopic

documentTopic(documentPath, topicPrefix?): string

Defined in: packages/core/src/document-topic.ts:43

Builds a pubsub topic string for a given document path by prepending the configured topic prefix. This separates document pubsub traffic from other topics on the same network.

The default prefix is '/peerborne/document/v3/'. Topic names are routing labels, not authentication; wire decoding and admission checks remain mandatory. Every peer sharing a document must use the same prefix. Pass an empty string to use the bare document path.

string

The path identifying the document.

string = DEFAULT_DOCUMENT_TOPIC_PREFIX

Prefix to prepend (defaults to '/peerborne/document/v3/').

string

The full pubsub topic string.