Hanzo
OpenapiMq

Creates a durable stream in the org's namespace and returns it.

Creates a durable stream in the org's namespace and returns it.

POST /v1/mq/stream

Addresshttps://api.hanzo.ai/v1/mq/stream
MethodPOST
Operationpost_mq_stream
AuthAuthorization: Bearer $HANZO_API_KEY

Creates a durable stream in the org's namespace and returns it.

Request

9 fields, body application/json (required).

FieldInTypeRequiredDescription
max_agebodystringMaxAge caps message age, e.g.
max_bytesbodyintegerMaxBytes caps the stream's total stored bytes; -1 (default) is unlimited.
max_msg_sizebodyintegerMaxMsgSize caps one message's size in bytes; -1 (default) is the broker's limit.
max_msgsbodyintegerMaxMsgs caps the number of stored messages; -1 (default) is unlimited.
namebodystringName is the stream name, unique within the org (alphanumeric, hyphens, underscores).
num_replicasbodyintegerReplicas is the number of stream replicas (1–5); this plane runs 1.
retentionbodystringRetention is the retention policy: limits (default), interest, or workqueue.
storagebodystringStorage is the storage backend: file (default) or memory.
subjectsbodystring[]Subjects are the org-relative subjects bound to this stream (wildcards supported).

Response

StatusBodyMeaning
201Streamcreated

201 body — 22 fields.

FieldInTypeAlwaysDescription
configbodyConfig
config.max_agebodystringMaxAge caps message age, e.g.
config.max_bytesbodyintegerMaxBytes caps the stream's total stored bytes; -1 (default) is unlimited.
config.max_msg_sizebodyintegerMaxMsgSize caps one message's size in bytes; -1 (default) is the broker's limit.
config.max_msgsbodyintegerMaxMsgs caps the number of stored messages; -1 (default) is unlimited.
config.namebodystringName is the stream name, unique within the org (alphanumeric, hyphens, underscores).
config.num_replicasbodyintegerReplicas is the number of stream replicas (1–5); this plane runs 1.
config.retentionbodystringRetention is the retention policy: limits (default), interest, or workqueue.
config.storagebodystringStorage is the storage backend: file (default) or memory.
config.subjectsbodystring[]Subjects are the org-relative subjects bound to this stream (wildcards supported).
createdbodystring (date-time)Created is when the stream was created.
namebodystringName is the stream name within the org.
statebodyState
state.bytesbodyintegerBytes is the total stored size.
state.consumer_countbodyintegerConsumers is the number of consumers attached to this stream.
state.first_seqbodyintegerFirstSeq is the sequence of the first stored message.
state.first_tsbodystring (date-time)FirstTS is the timestamp of the first stored message.
state.last_seqbodyintegerLastSeq is the sequence of the last stored message.
state.last_tsbodystring (date-time)LastTS is the timestamp of the last stored message.
state.messagesbodyintegerMessages is the number of messages currently stored.
state.num_deletedbodyintegerDeleted is the number of deleted messages (sequence gaps).
state.num_subjectsbodyintegerSubjects is the number of distinct subjects stored.

Failure carries the platform error shape — see Errors.

Examples

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.


MQ API · All Hanzo APIs · Interactive reference

How is this guide?

On this page