Overview
  • Namespace
  • Class

Namespaces

  • OpenCloud
    • Autoscale
      • Resource
    • CDN
      • Resource
    • CloudMonitoring
      • Collection
      • Exception
      • Resource
    • Common
      • Collection
      • Constants
      • Exceptions
      • Http
        • Message
      • Log
      • Resource
      • Service
    • Compute
      • Constants
      • Exception
      • Resource
    • Database
      • Resource
    • DNS
      • Collection
      • Resource
    • Identity
      • Constants
      • Resource
    • Image
      • Enum
      • Resource
        • JsonPatch
        • Schema
    • LoadBalancer
      • Collection
      • Enum
      • Resource
    • Networking
      • Resource
    • ObjectStore
      • Constants
      • Enum
      • Exception
      • Resource
      • Upload
    • Orchestration
      • Resource
    • Queues
      • Collection
      • Exception
      • Resource
    • Volume
      • Resource

Classes

  • Service

Class Service

Cloud Queues is an open source, scalable, and highly available message and notifications service. Users of this service can create and manage a "producer-consumer" or a "publisher-subscriber" model from one simple API. It is made up of a few basic components: queues, messages, claims, and stats.

In the producer-consumer model, users create queues where producers can post messages. Workers, or consumers, may then claim those messages and delete them once complete. A single claim may contain multiple messages, and administrators are given the ability to query claims for status.

In the publisher-subscriber model, messages are posted to a queue like above, but messages are never claimed. Instead, subscribers, or watchers, simply send GET requests to pull all messages since their last request. In this model, a message will remain in the queue, unclaimed, until the message's time to live (TTL) has expired.

Here is an overview of the Cloud Queues workflow:

  1. You create a queue to which producers post messages.

  2. Producers post messages to the queue.

  3. Workers claim messages from the queue, complete the work in that message, and delete the message.

  4. If a worker plans to be offline before its message completes, the worker can retire the claim TTL, putting the message back into the queue for another worker to claim.

  5. Subscribers monitor the claims of these queues to keep track of activity and help troubleshoot if things go wrong.

For the majority of use cases, Cloud Queues itself will not be responsible for the ordering of messages. If there is only a single producer, however, Cloud Queueing guarantees that messages are handled in a First In, First Out (FIFO) order.

OpenCloud\Common\Base
Extended by OpenCloud\Common\Service\AbstractService implements OpenCloud\Common\Service\ServiceInterface
Extended by OpenCloud\Common\Service\CatalogService
Extended by OpenCloud\Queues\Service implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Namespace: OpenCloud\Queues
Located at OpenCloud/Queues/Service.php

Methods summary

public static
# getSubscribedEvents( )
public
# appendClientIdToRequest( Guzzle\Common\Event $event )

Set the Client-ID header to all requests for this service.

Set the Client-ID header to all requests for this service.

Parameters

$event
public
# setClientId( null $clientId = null )

Parameters

$clientId

Returns


$this
public string
# getClientId( )

Returns

string
public OpenCloud\Queues\Resource\Queue
# createQueue( string $name )

Create a new Queue.

Create a new Queue.

Parameters

$name
Name of the new queue

Returns

OpenCloud\Queues\Resource\Queue

Throws

OpenCloud\Common\Exceptions\InvalidArgumentError
public Collection
# listQueues( array $params = array() )

This operation lists queues for the project, sorting the queues alphabetically by name.

This operation lists queues for the project, sorting the queues alphabetically by name.

Parameters

$params

An associative array of optional parameters:

  • marker (string) Specifies the name of the last queue received in a previous request, or none to get the first page of results. Optional.

  • limit (integer) Specifies up to 20 (the default, but configurable) queues to return. Optional.

  • detailed (bool) Determines whether queue metadata is included in the response. Optional.

Returns

Collection
public OpenCloud\Queues\Resource\Queue
# getQueue( $id = null )

Return an empty Queue.md object.

Return an empty Queue.md object.

Returns

OpenCloud\Queues\Resource\Queue
public boolean
# hasQueue( string $name )

This operation checks to see if the specified queue exists.

This operation checks to see if the specified queue exists.

Parameters

$name
The queue name that you want to check

Returns

boolean

Methods inherited from OpenCloud\Common\Service\CatalogService

__construct(), getBaseUrl(), getExtensions(), getName(), getRegion(), getType(), getUrl(), getUrlType(), limits(), name(), region(), url()

Methods inherited from OpenCloud\Common\Service\AbstractService

collection(), getClient(), getEndpoint(), getNamespaces(), getResources(), namespaces(), resource(), resourceList(), setClient(), setEndpoint()

Methods inherited from OpenCloud\Common\Base

__call(), checkJsonError(), generateUuid(), getInstance(), getLogger(), hasLogger(), makeResourceIteratorOptions(), populate(), setLogger(), stripNamespace(), toCamel(), toUnderscores()

Constants summary

string DEFAULT_TYPE
# 'rax:queues'
string DEFAULT_NAME
# 'cloudQueues'

Constants inherited from OpenCloud\Common\Service\CatalogService

DEFAULT_URL_TYPE, SUPPORTED_VERSION

Constants inherited from OpenCloud\Common\Base

PATCH_CONTENT_TYPE

API documentation generated by ApiGen