KubeMQ
Client SDKsNode.jsReference

Queues

Durable queues, polling, and streaming — KubeMQ Node.js SDK reference.

Send with sendQueueMessage, receive with receiveQueueMessages, and use streaming helpers for advanced throughput (see examples for stream send/receive, ack ranges, poll mode).

Simple Queues

sendQueueMessage

await client.sendQueueMessage(message: QueueMessage): Promise<QueueSendResult>

receiveQueueMessages

const messages = await client.receiveQueueMessages(request: QueuePollRequest): Promise<ReceivedQueueMessage[]>

QueuePollRequest:

FieldTypeRequiredDescription
channelstringYesQueue channel
maxMessagesnumberNoBatch size
waitTimeoutSecondsnumberYesLong poll wait
autoAckbooleanNoAuto-acknowledge on receipt

Each received message exposes ack(), nack(), and reQueue(channel) helpers.

Queue Streaming

Streaming queue APIs (upstream/downstream, batch ack/nack) follow the patterns demonstrated in the Queues examples. Refer to the example index for stream send, stream receive, auto ack, ack range, nack/requeue, and poll mode.

Quick Usage

queues.ts
await client.sendQueueMessage(
  createQueueMessage({ channel: "jobs", body: Buffer.from("task") }),
);

See Also

Was this page helpful?

On this page