---
title: "Queue Receive"
method: POST
path: "/api/v1.msgs.queue.receive"
tags: ["Msgs"]
---

# Queue Receive

`POST /api/v1.msgs.queue.receive`

Receives messages from a topic as competing consumers.

Messages are individually leased for the specified duration. Multiple consumers can receive
different messages from the same topic concurrently. Leased messages are skipped until they
are acked or their lease expires.

## Request body

- MsgQueueReceiveIn
  - `namespace` string, nullable
  - `topic` string, required
  - `consumer_group` string, required
  - `batch_size` integer
  - `lease_duration_ms` integer
  - `batch_wait_ms` integer, nullable — Maximum time (in milliseconds) to wait for messages before returning.

## Response `200`

- MsgQueueReceiveOut
  - `msgs` QueueMsgOut[], required
    - `msg_id` string, required
    - `value` integer[], required
    - `headers` object, required
    - `timestamp` integer, required
    - `scheduled_at` integer, nullable

## Other responses

- `400`
- `401`
- `403`
- `422`

---

[API](https://skmtc.net/svix/apis/diom-api.md) · [All operations](https://skmtc.net/svix/apis/diom-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/svix/diom-api/versions/e98d7f3a3e10/schema)
