Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP Manual > SAMConnection->peekAll - Read one or more messages from a queue without removing it from the queue.





ลองใช้ค้นหาข้อมูล


   
Bookmark.

SAMConnection->peekAll

(No version information available, might be only in CVS)

SAMConnection->peekAll Read one or more messages from a queue without removing it from the queue.

Description

SAMConnection
array peekAll ( string $target [, array $properties ] )

Parameters

target

The identity of the queue from which messages should be peeked.

properties

An optional associative array of properties describing other parameters to control the peek operation.
Property name Possible values
SAM_CORRELID This is the target correlation id string of messages to be peeked. This would typically have been returned by a "send" request.
SAM_MESSAGEID This is the message id string of a message which is to be peeked.

Return Values

This method returns an array of SAMMessage objects or FALSE if an error occurs.

Examples

Example #1 Retrieve all messages in a queue without removing them

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

Example #2 Retrieve all messages from a queue with a matching correlation id

<?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";
   }

?>



ThaiCreate.Com Forum


Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   







Load balance : Server 03
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่