Overview

Namespaces

  • OpenCloud
    • Autoscale
      • Resource
    • CloudMonitoring
      • 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
      • Enum
      • Resource
    • ObjectStore
      • Constants
      • Exception
      • Resource
      • Upload
    • Orchestration
    • Queues
      • Exception
      • Resource
    • Volume
      • Resource
  • PHP

Classes

  • Service
  • Overview
  • Namespace
  • Class
  • Tree
  • Download

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
Guzzle\Common\Event
$event
public mixed
# setClientId( null $clientId = null )

Parameters

$clientId
null
$clientId

Returns

mixed
$this
public string
# getClientId( )

Returns

string
public Queue
# createQueue( mixed $name )

Create a new Queue.

Create a new Queue.

Parameters

$name
mixed
$name Name of the new queue

Returns

Queue
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
array
$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 Queue
# getQueue( mixed $id = null )

Return an empty Queue.md object.

Return an empty Queue.md object.

Returns

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
string
$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()
Methods inherited from OpenCloud\Common\Service\AbstractService
collection(), getClient(), getCurrentNamespace(), getEndpoint(), getNamespaces(), getResources(), resolveResourceClass(), resource(), resourceList(), setClient(), setEndpoint()
Methods inherited from OpenCloud\Common\Base
__call(), checkJsonError(), generateUuid(), getInstance(), getJsonHeader(), getLogger(), getProperty(), makeResourceIteratorOptions(), populate(), propertyExists(), setLogger(), setProperty(), stripNamespace(), toCamel(), toUnderscores()
Constants summary
string DEFAULT_TYPE 'rax:queues'
#
string DEFAULT_NAME 'cloudQueues'
#
Constants inherited from OpenCloud\Common\Service\CatalogService
DEFAULT_URL_TYPE
Properties inherited from OpenCloud\Common\Service\CatalogService
$regionless
Properties inherited from OpenCloud\Common\Service\AbstractService
$client, $endpoint, $namespaces, $resources
Properties inherited from OpenCloud\Common\Base
$aliases
PHP OpenCloud API API documentation generated by ApiGen 2.8.0