Queues create

Open in

Use the ably queues create command to create a new queue for your Ably application.

Synopsis

ably queues create <queue-name> [options]

Arguments

queue-name
Required

The name of the queue to create.

Options

--app

The app ID to create the queue for. If not specified, the currently selected app is used.

--max-length

The maximum number of messages the queue can hold. The default value is 10000.

--region

The region to create the queue in. The default value is us-east-1-a. See the queues documentation for more details.

--ttl

The time-to-live for messages in the queue, in seconds. The default value is 60. The maximum value is 3600.

--json

Output results as compact JSON. Mutually exclusive with --pretty-json.

--pretty-json

Output results in formatted JSON. Mutually exclusive with --json.

--verbose | -v

Enable verbose logging. Can be combined with --json or --pretty-json.

Examples

Create a queue:

ably queues create "my-queue"

Create a queue with custom settings:

ably queues create "my-queue" --ttl 300 --max-length 5000

Create a queue in a specific region for a specific app:

ably queues create "my-queue" --region "eu-west-1-a" --app "My App"

Create a queue and output the result in JSON format:

ably queues create "my-queue" --json

See also

  • Queues — Explore all ably queues commands.
  • CLI reference — Full list of available commands.