kw topic
Reserved keyword
The list of words: §1.4
Syntax
Topic = "topic" Ident ":" Type [ "sharded" "by" FieldPath ] ;Grammar: App. A
Defined in
- 3.4 Declared types — data — a product type with named fields (§4.2).
- 10.5 Topics — cluster-wide fan-out — A topic is a distributed broadcast with storage in the built-in storage.
- 1.4 Keywords — Reserved (cannot be used as names)
Examples
@retain(ORDER_EVENTS_RETENTION)
topic OrderEvents: OrderEvent sharded by .userId
emit OrderEvents(e) // publication
for await e in OrderEvents.subscribe(key: uid, from: .Latest) { … }
for await e in OrderEvents.subscribe(group: "indexer") { index(e) }— 10.5 Topics — cluster-wide fan-out
Related diagnostics
unknown-type, topic-without-journal