<?php
$msgArray = $conn->peekAll('queue://receive/test', array(SAM_CORRELID => $correlId ));
if ($msgArray) {
foreach ( $msgArray as $key => $msg) {
echo "Message $key: body = $msg->body\n";
}
}
else
echo "PeekAll failed ($conn->errno) $conn->error";
}
?>