Skip to content

Commit

Permalink
Merge pull request #262 from Solodkiy/fix-some-empty-amqp-methods
Browse files Browse the repository at this point in the history
implements countMessages and removeQueue in PhpAmqpDriver
  • Loading branch information
henrikbjorn authored Dec 18, 2016
2 parents ed1d019 + ae42b2c commit 8e5884c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Driver/PhpAmqpDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ public function createQueue($queueName)
*/
public function countMessages($queueName)
{
list($queue, $messageCount, $consumerCount) = $this->getChannel()->queue_declare($queueName, true);
return $messageCount;
}

/**
Expand Down Expand Up @@ -136,6 +138,7 @@ public function peekQueue($queueName, $index = 0, $limit = 20)
*/
public function removeQueue($queueName)
{
$this->getChannel()->queue_delete($queueName);
}

/**
Expand Down

0 comments on commit 8e5884c

Please sign in to comment.