## Get Queue `client.Queues.Get(ctx, queueID, query) (*Queue, error)` **get** `/accounts/{account_id}/queues/{queue_id}` Get details about a specific queue. ### Parameters - `queueID string` A Resource identifier. - `query QueueGetParams` - `AccountID param.Field[string]` A Resource identifier. ### Returns - `type Queue struct{…}` - `Consumers []Consumer` - `type ConsumerMqWorkerConsumerResponse struct{…}` - `ConsumerID string` A Resource identifier. - `CreatedOn Time` - `DeadLetterQueue string` Name of the dead letter queue, or empty string if not configured - `QueueName string` - `ScriptName string` Name of a Worker - `Settings ConsumerMqWorkerConsumerResponseSettings` - `BatchSize float64` The maximum number of messages to include in a batch. - `MaxConcurrency float64` Maximum number of concurrent consumers that may consume from this Queue. Set to `null` to automatically opt in to the platform's maximum (recommended). - `MaxRetries float64` The maximum number of retries - `MaxWaitTimeMs float64` The number of milliseconds to wait for a batch to fill up before attempting to deliver it - `RetryDelay float64` The number of seconds to delay before making the message available for another attempt. - `Type ConsumerMqWorkerConsumerResponseType` - `const ConsumerMqWorkerConsumerResponseTypeWorker ConsumerMqWorkerConsumerResponseType = "worker"` - `type ConsumerMqHTTPConsumerResponse struct{…}` - `ConsumerID string` A Resource identifier. - `CreatedOn Time` - `DeadLetterQueue string` Name of the dead letter queue, or empty string if not configured - `QueueName string` - `Settings ConsumerMqHTTPConsumerResponseSettings` - `BatchSize float64` The maximum number of messages to include in a batch. - `MaxRetries float64` The maximum number of retries - `RetryDelay float64` The number of seconds to delay before making the message available for another attempt. - `VisibilityTimeoutMs float64` The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt. - `Type ConsumerMqHTTPConsumerResponseType` - `const ConsumerMqHTTPConsumerResponseTypeHTTPPull ConsumerMqHTTPConsumerResponseType = "http_pull"` - `ConsumersTotalCount float64` - `CreatedOn string` - `ModifiedOn string` - `Producers []QueueProducer` - `type QueueProducersMqWorkerProducer struct{…}` - `Script string` - `Type QueueProducersMqWorkerProducerType` - `const QueueProducersMqWorkerProducerTypeWorker QueueProducersMqWorkerProducerType = "worker"` - `type QueueProducersMqR2Producer struct{…}` - `BucketName string` - `Type QueueProducersMqR2ProducerType` - `const QueueProducersMqR2ProducerTypeR2Bucket QueueProducersMqR2ProducerType = "r2_bucket"` - `ProducersTotalCount float64` - `QueueID string` - `QueueName string` - `Settings QueueSettings` - `DeliveryDelay float64` Number of seconds to delay delivery of all messages to consumers. - `DeliveryPaused bool` Indicates if message delivery to consumers is currently paused. - `MessageRetentionPeriod float64` Number of seconds after which an unconsumed message will be delayed. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/queues" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) queue, err := client.Queues.Get( context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353", queues.QueueGetParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", queue.QueueID) } ``` #### Response ```json { "errors": [ { "code": 7003, "message": "No route for the URI", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ "string" ], "result": { "consumers": [ { "consumer_id": "023e105f4ecef8ad9ca31a8372d0c353", "created_on": "2019-12-27T18:11:19.117Z", "dead_letter_queue": "dead_letter_queue", "queue_name": "example-queue", "script_name": "my-consumer-worker", "settings": { "batch_size": 50, "max_concurrency": 10, "max_retries": 3, "max_wait_time_ms": 5000, "retry_delay": 10 }, "type": "worker" } ], "consumers_total_count": 0, "created_on": "created_on", "modified_on": "modified_on", "producers": [ { "script": "script", "type": "worker" } ], "producers_total_count": 0, "queue_id": "queue_id", "queue_name": "example-queue", "settings": { "delivery_delay": 5, "delivery_paused": true, "message_retention_period": 345600 } }, "success": true } ```