---
title: Consumers
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/python)

[Queues](https://developers.cloudflare.com/api/python/resources/queues)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Consumers

##### [List Queue Consumers](https://developers.cloudflare.com/api/python/resources/queues/subresources/consumers/methods/list)

queues.consumers.list(strqueue\_id, ConsumerListParams\*\*kwargs) -> SyncSinglePage\[[Consumer](<https://developers.cloudflare.com/api/python/resources/queues#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)>)]

GET/accounts/{account\_id}/queues/{queue\_id}/consumers

##### [Get Queue Consumer](https://developers.cloudflare.com/api/python/resources/queues/subresources/consumers/methods/get)

queues.consumers.get(strconsumer\_id, ConsumerGetParams\*\*kwargs) -> [Consumer](<https://developers.cloudflare.com/api/python/resources/queues#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)>)

GET/accounts/{account\_id}/queues/{queue\_id}/consumers/{consumer\_id}

##### [Create a Queue Consumer](https://developers.cloudflare.com/api/python/resources/queues/subresources/consumers/methods/create)

queues.consumers.create(strqueue\_id, ConsumerCreateParams\*\*kwargs) -> [Consumer](<https://developers.cloudflare.com/api/python/resources/queues#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)>)

POST/accounts/{account\_id}/queues/{queue\_id}/consumers

##### [Update Queue Consumer](https://developers.cloudflare.com/api/python/resources/queues/subresources/consumers/methods/update)

queues.consumers.update(strconsumer\_id, ConsumerUpdateParams\*\*kwargs) -> [Consumer](<https://developers.cloudflare.com/api/python/resources/queues#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)>)

PUT/accounts/{account\_id}/queues/{queue\_id}/consumers/{consumer\_id}

##### [Delete Queue Consumer](https://developers.cloudflare.com/api/python/resources/queues/subresources/consumers/methods/delete)

queues.consumers.delete(strconsumer\_id, ConsumerDeleteParams\*\*kwargs) -> [ConsumerDeleteResponse](<https://developers.cloudflare.com/api/python/resources/queues#(resource)%20queues.consumers%20%3E%20(model)%20consumer_delete_response%20%3E%20(schema)>)

DELETE/accounts/{account\_id}/queues/{queue\_id}/consumers/{consumer\_id}

##### ModelsExpand Collapse

<details>

<summary>

<a href="https://developers.cloudflare.com/api/python/resources/queues#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)">Consumer</a>

Response body representing a consumer

</summary>

One of the following:

<details>

<summary>

class MqWorkerConsumerResponse: …

</summary>

consumer\_id: Optional\[str]

A Resource identifier.

maxLength32

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20consumer_id">Link to this property</a>

created\_on: Optional\[datetime]

formatdate-time

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20created_on">Link to this property</a>

dead\_letter\_queue: Optional\[str]

Name of the dead letter queue, or empty string if not configured

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20dead_letter_queue">Link to this property</a>

queue\_name: Optional\[str]

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20queue_name">Link to this property</a>

script\_name: Optional\[str]

Name of a Worker

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20script_name">Link to this property</a>

<details>

<summary>

settings: Optional\[MqWorkerConsumerResponseSettings]

</summary>

batch\_size: Optional\[float]

The maximum number of messages to include in a batch.

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20settings%20%3E%20(property)%20batch_size">Link to this property</a>

max\_concurrency: Optional\[float]

Maximum number of concurrent consumers that may consume from this Queue. Set to <code>null</code> to automatically opt in to the platform’s maximum (recommended).

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20settings%20%3E%20(property)%20max_concurrency">Link to this property</a>

max\_retries: Optional\[float]

The maximum number of retries

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20settings%20%3E%20(property)%20max_retries">Link to this property</a>

max\_wait\_time\_ms: Optional\[float]

The number of milliseconds to wait for a batch to fill up before attempting to deliver it

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20settings%20%3E%20(property)%20max_wait_time_ms">Link to this property</a>

retry\_delay: Optional\[float]

The number of seconds to delay before making the message available for another attempt.

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20settings%20%3E%20(property)%20retry_delay">Link to this property</a>

</details>

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20settings">Link to this property</a>

type: Optional\[Literal\["worker"]]

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%200%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

class MqHTTPConsumerResponse: …

</summary>

consumer\_id: Optional\[str]

A Resource identifier.

maxLength32

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20consumer_id">Link to this property</a>

created\_on: Optional\[datetime]

formatdate-time

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20created_on">Link to this property</a>

dead\_letter\_queue: Optional\[str]

Name of the dead letter queue, or empty string if not configured

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20dead_letter_queue">Link to this property</a>

queue\_name: Optional\[str]

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20queue_name">Link to this property</a>

<details>

<summary>

settings: Optional\[MqHTTPConsumerResponseSettings]

</summary>

batch\_size: Optional\[float]

The maximum number of messages to include in a batch.

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20settings%20%3E%20(property)%20batch_size">Link to this property</a>

max\_retries: Optional\[float]

The maximum number of retries

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20settings%20%3E%20(property)%20max_retries">Link to this property</a>

retry\_delay: Optional\[float]

The number of seconds to delay before making the message available for another attempt.

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20settings%20%3E%20(property)%20retry_delay">Link to this property</a>

visibility\_timeout\_ms: Optional\[float]

The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20settings%20%3E%20(property)%20visibility_timeout_ms">Link to this property</a>

</details>

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20settings">Link to this property</a>

type: Optional\[Literal\["http\_pull"]]

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%201%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)%20%3E%20(variant)%201">Link to this property</a>

</details>

[Link to this property](<#(resource)%20queues.consumers%20%3E%20(model)%20consumer%20%3E%20(schema)>)

<details>

<summary>

class ConsumerDeleteResponse: …

</summary>

<details>

<summary>

errors: Optional\[List\[<a href="https://developers.cloudflare.com/api/python/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)">ResponseInfo</a>]]

minLength1

</summary>

code: int

minimum1000

<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20code">Link to this property</a>

message: str

<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url: Optional\[str]

<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source: Optional\[Source]

</summary>

pointer: Optional\[str]

<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20response_info%20%3E%20(schema)%20%3E%20(property)%20source">Link to this property</a>

</details>

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer_delete_response%20%3E%20(schema)%20%3E%20(property)%20errors">Link to this property</a>

messages: Optional\[List\[str]]

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer_delete_response%20%3E%20(schema)%20%3E%20(property)%20messages">Link to this property</a>

success: Optional\[Literal\[true]]

Indicates if the API call was successful or not.

<a href="#(resource)%20queues.consumers%20%3E%20(model)%20consumer_delete_response%20%3E%20(schema)%20%3E%20(property)%20success">Link to this property</a>

</details>

[Link to this property](<#(resource)%20queues.consumers%20%3E%20(model)%20consumer_delete_response%20%3E%20(schema)>)