OxL Reference

fn noKey

The key of a topic without sharded by.

Example:

oxl✓ checked in CI
data Job { id: i64 }

topic Jobs: Job

cluster demo {
  role store { journal }
}

fn main() -> () | TopicError io, db {
  Jobs.publish(Job{ id: 5 })?
  for await j in Jobs.subscribe(from: .Earliest) {
    print("job {j.id}")
    break
  }
}
Output
job 5
pub(api) fn noKey() -> bytes

Since. 1.0.0-beta

Returns

bytes

Effects

none declared (pure unless the body says otherwise)

Defined in: std/topic/topic.oxl:187

See also