Properties

$queueName

$queueName : 

Type

$client

$client : 

Type

$base64

$base64 : 

Type

Methods

__construct()

__construct(\AliyunMNS\Http\HttpClient  $client,   $queueName,   $base64 = TRUE) 

Parameters

\AliyunMNS\Http\HttpClient $client
$queueName
$base64

setBase64()

setBase64(  $base64) 

Parameters

$base64

isBase64()

isBase64() 

getQueueName()

getQueueName() 

setAttribute()

setAttribute(\AliyunMNS\Model\QueueAttributes  $attributes) : \AliyunMNS\SetQueueAttributeResponse:

Set the QueueAttributes, detail API sepcs: https://docs.aliyun.com/?spm=#/pub/mns/api_reference/api_spec&queue_operation

Parameters

\AliyunMNS\Model\QueueAttributes $attributes

Throws

\AliyunMNS\QueueNotExistException

if queue does not exist

\AliyunMNS\InvalidArgumentException

if any argument value is invalid

\AliyunMNS\MnsException

if any other exception happends

Returns

\AliyunMNS\SetQueueAttributeResponse: —

the response

getAttribute()

getAttribute() : \AliyunMNS\GetQueueAttributeResponse:

Get the QueueAttributes, detail API sepcs: https://docs.aliyun.com/?spm=#/pub/mns/api_reference/api_spec&queue_operation

Throws

\AliyunMNS\QueueNotExistException

if queue does not exist

\AliyunMNS\MnsException

if any other exception happends

Returns

\AliyunMNS\GetQueueAttributeResponse: —

containing the attributes

getAttributeAsync()

getAttributeAsync(\AliyunMNS\AsyncCallback  $callback = NULL) 

Parameters

\AliyunMNS\AsyncCallback $callback

sendMessage()

sendMessage(\AliyunMNS\Requests\SendMessageRequest  $request) : \AliyunMNS\SendMessageResponse:

SendMessage, the messageBody will be automatically encoded in base64 If you do not need the message body to be encoded in Base64, please specify the $base64 = FALSE in Queue

detail API sepcs: https://docs.aliyun.com/?spm=#/pub/mns/api_reference/api_spec&message_operation

Parameters

\AliyunMNS\Requests\SendMessageRequest $request

Throws

\AliyunMNS\QueueNotExistException

if queue does not exist

\AliyunMNS\InvalidArgumentException

if any argument value is invalid

\AliyunMNS\MalformedXMLException

if any error in xml

\AliyunMNS\MnsException

if any other exception happends

Returns

\AliyunMNS\SendMessageResponse: —

containing the messageId and bodyMD5

peekMessage()

peekMessage() : \AliyunMNS\PeekMessageResponse:

PeekMessage, the messageBody will be automatically decoded as base64 if the $base64 in Queue is TRUE

detail API sepcs: https://docs.aliyun.com/?spm=#/pub/mns/api_reference/api_spec&message_operation

Throws

\AliyunMNS\QueueNotExistException

if queue does not exist

\AliyunMNS\MessageNotExistException

if no message exists in the queue

\AliyunMNS\MnsException

if any other exception happends

Returns

\AliyunMNS\PeekMessageResponse: —

containing the messageBody and properties

peekMessageAsync()

peekMessageAsync(\AliyunMNS\AsyncCallback  $callback = NULL) 

Parameters

\AliyunMNS\AsyncCallback $callback

receiveMessage()

receiveMessage(  $waitSeconds = NULL) : \AliyunMNS\ReceiveMessageResponse:

ReceiveMessage, the messageBody will be automatically decoded as base64 if $base64 = TRUE in Queue detail API sepcs: https://docs.aliyun.com/?spm=#/pub/mns/api_reference/api_spec&message_operation

Parameters

$waitSeconds

Throws

\AliyunMNS\QueueNotExistException

if queue does not exist

\AliyunMNS\MessageNotExistException

if no message exists in the queue

\AliyunMNS\MnsException

if any other exception happends

Returns

\AliyunMNS\ReceiveMessageResponse: —

containing the messageBody and properties the response is same as PeekMessageResponse, except that the receiptHandle is also returned in receiveMessage

receiveMessageAsync()

receiveMessageAsync(\AliyunMNS\AsyncCallback  $callback = NULL) 

Parameters

\AliyunMNS\AsyncCallback $callback

deleteMessage()

deleteMessage(  $receiptHandle) : \AliyunMNS\Responses\ReceiveMessageResponse

DeleteMessage detail API sepcs: https://docs.aliyun.com/?spm=#/pub/mns/api_reference/api_spec&message_operation

Parameters

$receiptHandle

Throws

\AliyunMNS\QueueNotExistException

if queue does not exist

\AliyunMNS\InvalidArgumentException

if the argument is invalid

\AliyunMNS\ReceiptHandleErrorException

if the $receiptHandle is invalid

\AliyunMNS\MnsException

if any other exception happends

Returns

\AliyunMNS\Responses\ReceiveMessageResponse

deleteMessageAsync()

deleteMessageAsync(  $receiptHandle, \AliyunMNS\AsyncCallback  $callback = NULL) 

Parameters

$receiptHandle
\AliyunMNS\AsyncCallback $callback

changeMessageVisibility()

changeMessageVisibility(  $receiptHandle,   $visibilityTimeout) : \AliyunMNS\Responses\ChangeMessageVisibilityResponse

ChangeMessageVisibility, set the nextVisibleTime for the message detail API sepcs: https://docs.aliyun.com/?spm=#/pub/mns/api_reference/api_spec&message_operation

Parameters

$receiptHandle
$visibilityTimeout

Throws

\AliyunMNS\QueueNotExistException

if queue does not exist

\AliyunMNS\MessageNotExistException

if the message does not exist

\AliyunMNS\InvalidArgumentException

if the argument is invalid

\AliyunMNS\ReceiptHandleErrorException

if the $receiptHandle is invalid

\AliyunMNS\MnsException

if any other exception happends

Returns

\AliyunMNS\Responses\ChangeMessageVisibilityResponse

batchSendMessage()

batchSendMessage(\AliyunMNS\Requests\BatchSendMessageRequest  $request) : \AliyunMNS\Responses\BatchSendMessageResponse

BatchSendMessage, message body will be automatically encoded in base64 If you do not need the message body to be encoded in Base64, please specify the $base64 = FALSE in Queue

detail API sepcs: https://docs.aliyun.com/?spm=#/pub/mns/api_reference/api_spec&message_operation

Parameters

\AliyunMNS\Requests\BatchSendMessageRequest $request

Throws

\AliyunMNS\QueueNotExistException

if queue does not exist

\AliyunMNS\MalformedXMLException

if any error in the xml

\AliyunMNS\InvalidArgumentException

if the argument is invalid

\AliyunMNS\BatchSendFailException

if some messages are not sent

\AliyunMNS\MnsException

if any other exception happends

Returns

\AliyunMNS\Responses\BatchSendMessageResponse

batchReceiveMessage()

batchReceiveMessage(\AliyunMNS\Requests\BatchReceiveMessageRequest  $request) : \AliyunMNS\BatchReceiveMessageResponse:

BatchReceiveMessage, message body will be automatically decoded as base64 if $base64 = TRUE in Queue

detail API sepcs: https://docs.aliyun.com/?spm=#/pub/mns/api_reference/api_spec&message_operation

Parameters

\AliyunMNS\Requests\BatchReceiveMessageRequest $request

Throws

\AliyunMNS\QueueNotExistException

if queue does not exist

\AliyunMNS\MessageNotExistException

if no message exists

\AliyunMNS\MnsException

if any other exception happends

Returns

\AliyunMNS\BatchReceiveMessageResponse: —

the received messages

batchPeekMessage()

batchPeekMessage(  $numOfMessages) : \AliyunMNS\BatchPeekMessageResponse:

BatchPeekMessage, message body will be automatically decoded as base64 is $base64 = TRUE in Queue

detail API sepcs: https://docs.aliyun.com/?spm=#/pub/mns/api_reference/api_spec&message_operation

Parameters

$numOfMessages

Throws

\AliyunMNS\QueueNotExistException

if queue does not exist

\AliyunMNS\MessageNotExistException

if no message exists

\AliyunMNS\MnsException

if any other exception happends

Returns

\AliyunMNS\BatchPeekMessageResponse: —

the received messages

batchPeekMessageAsync()

batchPeekMessageAsync(  $numOfMessages, \AliyunMNS\AsyncCallback  $callback = NULL) 

Parameters

$numOfMessages
\AliyunMNS\AsyncCallback $callback

batchDeleteMessage()

batchDeleteMessage(  $receiptHandles) : \AliyunMNS\Responses\BatchDeleteMessageResponse

BatchDeleteMessage detail API sepcs: https://docs.aliyun.com/?spm=#/pub/mns/api_reference/api_spec&message_operation

Parameters

$receiptHandles

Throws

\AliyunMNS\QueueNotExistException

if queue does not exist

\AliyunMNS\ReceiptHandleErrorException

if the receiptHandle is invalid

\AliyunMNS\InvalidArgumentException

if the argument is invalid

\AliyunMNS\BatchDeleteFailException

if any message not deleted

\AliyunMNS\MnsException

if any other exception happends

Returns

\AliyunMNS\Responses\BatchDeleteMessageResponse

batchDeleteMessageAsync()

batchDeleteMessageAsync(  $receiptHandles, \AliyunMNS\AsyncCallback  $callback = NULL) 

Parameters

$receiptHandles
\AliyunMNS\AsyncCallback $callback