Hanzo
OpenapiMq

Pulls the consumer's next batch.

Pulls the consumer's next batch. Delivered messages are acknowledged on delivery — the broker will not redeliver what this call returns; an empty wait…

POST /v1/mq/stream/{stream}/consumer/{name}/next

Addresshttps://api.hanzo.ai/v1/mq/stream/{stream}/consumer/{name}/next
MethodPOST
Operationpost_mq_stream_by_stream_consumer_by_name_next
AuthAuthorization: Bearer $HANZO_API_KEY

Pulls the consumer's next batch. Delivered messages are acknowledged on delivery — the broker will not redeliver what this call returns; an empty wait answers 408.

Request

7 fields, body application/json (required).

FieldInTypeRequiredDescription
streampathstringyesStream is the stream name, from the path.
namepathstringyesName is the consumer name, from the path.
batchbodyintegerBatch is how many messages to pull (1–1000, default 1).
expiresbodystringExpires is how long to wait for messages, e.g.
namebodystringName is the consumer name, from the path.
no_waitbodybooleanNoWait answers immediately with whatever is available instead of waiting.
streambodystringStream is the stream name, from the path.

Response

StatusBodyMeaning
200readOutok

200 body — 9 fields.

FieldInTypeAlwaysDescription
messagesbodyDelivery[]Messages is what was read, stream-ordered.
messages[].databodystringData is the payload, base64-encoded.
messages[].headersbodyobjectHeaders are the message headers, when any were published.
messages[].headers.*bodystring[]
messages[].num_deliveredbodyintegerDelivered is how many times a consumer has been handed this message (pulls only).
messages[].num_pendingbodyintegerRemaining is how many messages follow this one for the consumer (pulls only).
messages[].sequencebodyintegerSequence is the message's stream sequence.
messages[].subjectbodystringSubject is the org-relative subject the message was stored under.
messages[].timestampbodystring (date-time)Timestamp is when the broker stored the message.

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