Skip to content

Commit

Permalink
implements countMessages and removeQueue in PhpAmqpDriver
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Solodkiy committed Nov 6, 2016
1 parent bdb69cb commit ae42b2c
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 ae42b2c

Please sign in to comment.