System Status
Buy Now
  • Rackspace Cloud
  • Email & Apps
  • Fanatical Support for AWS
  • Managed Google Cloud Platform
  • Office 365
Login
  • MyRackspace Portal
  • Cloud Control Panel
  • Rackspace Webmail Login
  • Cloud Office Control Panel
  • Support Home
  • How-To
  • Developer Documentation
  •  Blogs 
    • Technical Blog
    • Rackspace Blog
    • Solve: Thought Leadership

Support Network

End-to-End Multicloud Solutions.   Solving Together.â„¢   Learn more at Rackspace.com

How–To Home

Cloud Queues

  • Introduction
  • FAQ
  • All Articles

Create a Cloud Queue

Last updated on:  2016-05-06

Authored by:  Megan Meza


Creating a Cloud Queue can be accomplished through the Cloud Control Panel or at the command line. After creating the Queue, you can use the Control Panel for viewing Queue details or deleting the Queue as needed. All other Queue commands will be completed through the command line.

Note: Be sure to set up your authentication token before creating a queue by using the command line.

Create a queue in the control panel

  1. Log in to the Cloud Control Panel.

  2. In the Servers tab, click Message Queueing.

  3. Click the Create Queue button.

  4. In the pop out box, enter a name for your queue, select your preferred region, and then click Create Queue.

When the queue is finished building, you will see the details for your queue listed in the Control Panel. You will then need to complete the steps under Testing Your Queue in your terminal to begin posting messages to your Queue.

Create a queue from the command line

You can create a queue from the command line by submitting a request to the Rackspace Cloud Queues API. You need to provide the following values in your request:

  • $TOKEN - valid Rackspace Cloud authentication token
  • $ENDPOINT - the Cloud Queues API endpoint returned in the service catalog

Use the following cURL command to create a queue using the Cloud Queues API:

$ curl -i -X PUT https://$ENDPOINT:443/v1/queues/samplequeue -H "X-Auth-Token: $TOKEN"

The response should look similar to the following:

HTTP/1.1 200 OK Content-Length: 140 Content-Type: application/json; charset=utf-8 Content-Location: /v1/queues {"queues": [{"href": "/v1/queues/samplequeue", "name": "samplequeue"}], "links": [{"href": "/v1/queues?marker=samplequeue", "rel": "next"}]}

Test your queue

You can test that your queue was created successfully by posting a message to it with the following cURL command:

$ curl -i -X POST https://$ENDPOINT:443/v1/queues/samplequeue/messages -d \
'[{"ttl": 300, "body": {"event": "one"}}]' \
-H "Content-type: application/json" \
-H "Client-ID: e58668fc-26eb-11e3-8270-5b3128d43830" \
-H "X-Auth-Token: $TOKEN"

The response should look similar to the following:

HTTP/1.1 201 Created
Content-Length: 93
Content-Type: application/json; charset=utf-8
Location: /v1/queues/samplequeue/51e840b61d10b20570d56ff4

{"partial": false, "resources": ["/v1/queues/samplequeue/messages/51e840b61d10b20570d56ff4"]}

Share this information:

©2020 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

See license specifics and DISCLAIMER

About Rackspace
  • About
  • Customer Stories
  • Events
  • Programs
Blogs
  • The Rackspace Blog
  • Technical Blog
  • Solve: Thought Leadership
  • News
  • Contact Information
  • Legal
  • Careers
Site Information
  • Style Guide for Technical Content
  • Trademarks
  • Privacy Statement
  • Website Terms
Support Network
  • Support Network Home
  • Rackspace How-To
  • API Documentation
  • Developer Center
  • ©2020 Rackspace US, Inc.