|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64737 Killing a PHP script using consume() clears the queue
Submitted: 2013-04-29 23:57 UTC Modified: 2013-04-30 22:23 UTC
From: brandon at brandonsavage dot net Assigned:
Status: Closed Package: amqp (PECL)
PHP Version: 5.5.0beta4 OS: Ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: brandon at brandonsavage dot net
New email:
PHP Version: OS:


 [2013-04-29 23:57 UTC] brandon at brandonsavage dot net
I'm using PHP 5.4beta4 and RabbitMQ 2.8.4. I've noticed that if I use a script that has a consume() method, and doesn't explicitly ack, and then kill off the script, it clears the queue.

Test script:

// Create a connection
$cnn = new AMQPConnection();

// Create a channel
$ch = new AMQPChannel($cnn);

// Declare a new exchange
$ex = new AMQPExchange($ch);

// Create a new queue
$q = new AMQPQueue($ch);

// Bind it on the exchange to routing.key
$q->bind('new_topic_exchange', 'routing.key');

// Publish a message to the exchange with a routing key
$ex->publish('message', 'routing.key');

// Read from the queue

Expected result:
I expect that since I'm not ack-ing the result, the results shouldn't be purged from the queue.

Actual result:
ALL messages are actually purged from the queue.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-04-30 22:23 UTC] brandon at brandonsavage dot net
This isn't a bug, it's an implementation error.
 [2013-04-30 22:23 UTC] brandon at brandonsavage dot net
-Status: Open +Status: Closed
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Aug 03 15:01:23 2021 UTC