TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nubskr/walrus/llms.txt
Use this file to discover all available pages before exploring further.
REGISTER command creates a new topic if it doesn’t already exist. This operation is idempotent - registering an existing topic succeeds without error.
Syntax
The name of the topic to register. Must be a single word (no spaces).
Wire Format
Request:Behavior
Topic Creation
- The request is routed to the Raft leader
- A new topic entry is proposed to the Raft cluster
- Once committed, the topic metadata is replicated to all nodes
- The first segment (segment 0) is created with an assigned leader node
- Leadership for the topic rotates round-robin as segments roll over
Idempotency
Registering an existing topic returnsOK without modification:
- No duplicate topics are created
- Existing segment assignments remain unchanged
- Safe to call multiple times
Examples
Interactive Shell
One-off Command
Programmatic Usage (Rust)
Error Cases
Missing Topic Name
Request:Invalid Topic Name
Topic names with spaces are not supported. Use the first word only:Cluster Errors
- Raft not ready:
ERR raft cluster not initialized - Connection timeout:
ERR connect to 127.0.0.1:9091 - Node unavailable: Connection refused or timeout
Cluster Behavior
Request Routing
- Client connects to any node in the cluster
- If the node is not the Raft leader, it forwards the request
- Leader commits the topic creation through Raft consensus
- Response is returned to the client through the original node
Metadata Replication
Once a topic is registered:- Metadata is replicated to all nodes via Raft
- All nodes can answer STATE queries for the topic
- The assigned leader node accepts PUT operations
- Segment leadership rotates automatically on rollover