Overview

Namespaces

  • OpenCloud
    • Autoscale
      • Resource
    • CloudMonitoring
      • Exception
      • Resource
    • Common
      • Collection
      • Constants
      • Exceptions
      • Http
        • Message
      • Identity
      • Log
      • Service
    • Compute
      • Constants
      • Exception
      • Resource
    • Database
      • Resource
    • DNS
      • Resource
    • LoadBalancer
      • Resource
    • ObjectStore
      • Constants
      • Exception
      • Resource
      • Upload
    • Orchestration
    • Queues
      • Exception
      • Resource
    • Volume
      • Resource
  • PHP

Classes

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

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\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
string
$href

Returns

OpenCloud\Queues\Resource\Message
public
# createJson( )

Returns an object for the Create() method JSON Must be overridden in a child class.

Returns an object for the Create() method JSON Must be overridden in a child class.

Throws

CreateError
if not overridden

Overrides

OpenCloud\Common\PersistentObject::createJson()
public HttpResponse
# create( array $params = array() )

Creates a new object

Creates a new object

Parameters

$params
array
$params array of values to set when creating the object

Returns

HttpResponse

Throws

VolumeCreateError
if HTTP status is not Success

Overrides

OpenCloud\Common\PersistentObject::create()
public HttpResponse
# update( array $params = array() )

Updates an existing object

Updates an existing object

Parameters

$params
array
$params array of values to set when updating the object

Returns

HttpResponse

Throws

VolumeCreateError
if HTTP status is not Success

Api

Overrides

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

This operation immediately deletes the specified message.

This operation immediately deletes the specified message.

Parameters

$claimId
string
$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 not specify $claimId, but the message is claimed, the operation fails. You can only delete claimed messages by providing an appropriate $claimId.

Returns

boolean

Throws

OpenCloud\Queues\Exception\DeleteMessageException

Overrides

OpenCloud\Common\PersistentObject::delete()
Methods inherited from OpenCloud\Common\PersistentObject
__construct(), action(), checkExtension(), createUrl(), findLink(), getClient(), getMetadata(), getParent(), getService(), getUrl(), id(), jsonCollectionElement(), jsonCollectionName(), jsonName(), name(), noCreate(), noDelete(), noUpdate(), parseResponse(), primaryKeyField(), refresh(), refreshFromLocationUrl(), region(), resourceName(), setMetadata(), setParent(), setService(), status(), updateJson(), url(), waitFor()
Methods inherited from OpenCloud\Common\Base
__call(), checkJsonError(), generateUuid(), getLogger(), getProperty(), makeResourceIteratorOptions(), populate(), propertyExists(), setLogger(), setProperty(), stripNamespace(), toCamel(), toUnderscores()
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\PersistentObject
$metadata
PHP OpenCloud API API documentation generated by ApiGen 2.8.0