I am using ZendQueue component https://github.com/zendframework/ZendQueue.
After I read my messages, I try to delete them.
I am using the Queue
object and the Activemq
adapter.
I am connecting ok, as I am able to get the data I publish. The code is below:
$message_iterator = $queue->receive(50,50);
foreach($message_iterator as $MessageObject){
do_somthing($MessageObject->body);
$queue->getAdapter()->deleteMessage($MessageObject);
}
$queue is \ZendQueue\Queue
$MessageObject is \ZendQueue\Message
adapter is ZendQueue\Adapter\Activemq