PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Delete a message

In order to delete the message from the queue, use the deleteMessage() method. This method deletes the specified message.

Example 94. Deleting a message

<?php
// process and delete $max messages
$messages $queues->receiveMessages($queueId$max);
if (
count($messages)) {
    foreach (
$messages as $message) {
        
process($message);
        
$queues->deleteMessage($queueId$message);
    }
}

Zend Framework