@ @retain
@retain
Applies to: topic
Section: §10.5
Syntax
Attr = "@" Path [ "(" [ AttrArgs ] ")" ] ;Grammar: App. A
Defined in
- 10.5 Topics — cluster-wide fan-out — A topic is a distributed broadcast with storage in the built-in storage.
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