php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #60031 incorrect document and example
Submitted: 2011-10-10 17:44 UTC Modified: 2011-12-03 19:23 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:2 (100.0%)
From: tasanakorn at gmail dot com Assigned:
Status: Not a bug Package: amqp (PECL)
PHP Version: 5.3.8 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tasanakorn at gmail dot com
New email:
PHP Version: OS:

 

 [2011-10-10 17:44 UTC] tasanakorn at gmail dot com
Description:
------------
AMQP_NOACK mean don't need to ack(). 
This method should used with a message this is retrieved without the AMQP_NOACK 
flag. 


<?php

/* Create a connection using all default credentials: */
$connection = new AMQPConnection();
$connection->connect();

/* create a queue object */
$queue = new AMQPQueue($connection);

//declare the queue
$queue->declare('myqueue');

//get the next message, but don't mark it as delivered
$message = $queue->get(0);

echo $message['msg'];

//acknowledge the message as received
$queue->ack($message['delivery_tag']);

?>
---
From manual page: http://www.php.net/amqpqueue.ack#refsect1-amqpqueue.ack-
description
---



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-12-03 19:23 UTC] frozenfire@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This method seems to be documented correctly. Presumably, the idea behind this is 
to allow one to delay acknowledgement of the receipt of a message until it has 
been parsed and verified. So, one would pass AMQP_NOACK to the get method, check 
the message, and then if the message is valid, acknowledge it with the ack 
method.
 [2011-12-03 19:23 UTC] frozenfire@php.net
-Status: Open +Status: Bogus
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 11:01:27 2024 UTC