Example #1
0
 public function ack()
 {
     if (!$this->reliably) {
         throw new \LogicException('Unable to perform ack in non reliably mode');
     }
     if (!$this->ackExpected) {
         throw new \LogicException('Unable to perform ack without consuming message');
     }
     $this->client->rpop($this->getWorkingChannelName());
     if (0 === $this->client->srem($this->channel->getName(), array($this->getWorkingChannelName()))) {
         throw new \RuntimeException("Unknown working channel name '{$this->getWorkingChannelName()}");
     }
     $this->ackExpected = false;
 }