NATS Tool
The nats tool provides access to NATS JetStream and Key/Value store
operations for caching, messaging, and lightweight state.
Object Store operations are deprecated
operation: object_put / object_get targeted the NATS JetStream
Object Store tier, which was removed from TempStore in phase 0 of the
RisingWave alignment.
The standalone nats object_* operations are scheduled for removal in
phase 1. Migrate to the s3 tool (MinIO via NOETL_S3_ENDPOINT) or
the new disk storage tier.
Standard reminders:
- No step-level
case/eval/expr. Usewhenin task policy and router arcs. - Use
task.spec.policy.rulesfor retry/fail/jump/break/continue.
Basic usage
- step: cache_value
tool:
- put:
kind: nats
auth: nats_credential
operation: kv_put
bucket: sessions
key: "{{ workload.session_id }}"
value:
user_id: "{{ workload.user_id }}"
expires_at: "{{ workload.expires_at }}"
spec:
policy:
rules:
- when: "{{ outcome.status == 'error' }}"
then: { do: fail }
- else:
then: { do: break }
Operations (selection)
K/V store:
kv_get,kv_put,kv_delete,kv_keys,kv_purge
Object store:
object_get,object_put,object_delete,object_list,object_info
JetStream:
js_publish,js_get_msg,js_stream_info
Operation inputs are tool-specific (bucket/key/value/name/subject/etc).
See also
- Auth & keychain:
documentation/docs/reference/auth_and_keychain_reference.md