pdezwart/php-amqp — pull request #40 by pinepain (2013-01-13 17:29:03+00:00)
Title: fix bug https://bugs.php.net/bug.php?id=63885, add AMQPQueue::getConsume...

Fix and tests for https://bugs.php.net/bug.php?id=63885. Also fixed `AMQPQueue::cancel` behavior and added `AMQPQueue::getConsumerTag` function which returns last consumer tag used by `AMQPQueue::consume`. `AMQPQueue::consume` no returns consumer tag it used as a string.

Question: should we cancel consumer implicit after consuming finished or not? Here I have two use-cases:

1. After consuming with `AMQPQueue::consume` user script exit php interpreter and consumer will be canceled by broker without any extra costs for client.

2. When user consume in a loop, he has to take care about consumer tag uniqueness (if he use custom tag) and cleanup unused consumer tags.

The reason to do all this stuff i wrong behavior for `cancel` method (as well as it documentation on php.net) and slightly wrong behavior of `consume`.

The talk about all this stuff was in https://github.com/pdezwart/php-amqp/pull/12 pull request.