Overview

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
  • PHP

Classes

  • Claim
  • Message
  • Queue
  • Overview
  • Namespace
  • Class
  • Tree

Class Message

A message is a task, a notification, or any meaningful data that gets posted to the queue. A message exists until it is deleted by a recipient or automatically by the system based on a TTL (time-to-live) value.

OpenCloud\Common\Base
Extended by OpenCloud\Common\Resource\BaseResource
Extended by OpenCloud\Common\Resource\PersistentResource
Extended by OpenCloud\Common\PersistentObject
Extended by OpenCloud\Queues\Resource\Message
Namespace: OpenCloud\Queues\Resource
Located at OpenCloud/Queues/Resource/Message.php
Methods summary
public OpenCloud\Queues\Resource\Message
# setHref( string $href )

Set href (and ID).

Set href (and ID).

Parameters

$href

Returns

OpenCloud\Queues\Resource\Message
self
public string
# getHref( )

Returns

string
string
public object
# createJson( )

Provides JSON for create request body

Provides JSON for create request body

Returns

object
object

Throws

RuntimeException
\RuntimeException

Overrides

OpenCloud\Common\Resource\PersistentResource::createJson()
public Guzzle\Http\Message\Response
# create( array $params = array() )

Create a new resource

Create a new resource

Parameters

$params

Returns

Guzzle\Http\Message\Response
\Guzzle\Http\Message\Response

Overrides

OpenCloud\Common\Resource\PersistentResource::create()
public Guzzle\Http\Message\Response
# update( array $params = array() )

Update a resource

Update a resource

Parameters

$params

Returns

Guzzle\Http\Message\Response
\Guzzle\Http\Message\Response

Overrides

OpenCloud\Common\Resource\PersistentResource::update()
public boolean
# delete( string $claimId = null )

This operation immediately deletes the specified message.

This operation immediately deletes the specified message.

Parameters

$claimId
Specifies that the message should be deleted only if it has the specified claim ID, and that claim has not expired. This is useful for ensuring only one agent processes any given message. Whenever a worker client's claim expires before it has a chance to delete a message it has processed, the worker must roll back any actions it took based on that message because another worker will now be able to claim and process the same message. If you do <em>not</em> specify $claimId, but the message is claimed, the operation fails. You can only delete claimed messages by providing an appropriate $claimId.

Returns

boolean
bool

Throws

OpenCloud\Queues\Exception\DeleteMessageException
DeleteMessageException

Overrides

OpenCloud\Common\Resource\PersistentResource::delete()
public string
# getClaimIdFromHref( )

If this message has been claimed, retrieve the claim id.

If this message has been claimed, retrieve the claim id.

Returns

string
string
Methods inherited from OpenCloud\Common\Resource\PersistentResource
checkExtension(), generateJsonPatch(), getAlias(), getUpdateablePropertiesAsArray(), noCreate(), noDelete(), noUpdate(), recursivelyAliasPropertyValue(), refresh(), refreshFromLocationUrl(), refreshFromParent(), updateJson(), waitFor()
Methods inherited from OpenCloud\Common\Resource\BaseResource
__construct(), findLink(), getClient(), getMetadata(), getParent(), getService(), getUrl(), jsonCollectionElement(), jsonCollectionName(), jsonName(), parseResponse(), primaryKeyField(), resourceName(), setMetadata(), setParent(), setService()
Methods inherited from OpenCloud\Common\Base
__call(), checkJsonError(), generateUuid(), getInstance(), getJsonHeader(), getLogger(), getPatchHeaders(), getProperty(), hasLogger(), makeResourceIteratorOptions(), populate(), propertyExists(), setLogger(), setProperty(), stripNamespace(), toCamel(), toUnderscores()
Constants inherited from OpenCloud\Common\Base
PATCH_CONTENT_TYPE
Properties summary
protected static string $url_resource
#'messages'
protected static string $json_collection_name
#'messages'
protected static string $json_name
#''
Properties inherited from OpenCloud\Common\Resource\BaseResource
$metadata, $parent, $service
Properties inherited from OpenCloud\Common\Base
$aliases
API documentation generated by ApiGen 2.8.0