|
@@ 756-763 (lines=8) @@
|
| 753 |
|
* @throws \InvalidArgumentException |
| 754 |
|
* @throws \PHPDaemon\Clients\AMQP\Driver\Protocol\Exception\AMQPProtocolException |
| 755 |
|
*/ |
| 756 |
|
public function cancel($consumerTag, array $options = []) |
| 757 |
|
{ |
| 758 |
|
$noWait = array_key_exists('noWait', $options) ? $options['noWait'] : null; |
| 759 |
|
|
| 760 |
|
$outputFrame = Basic\BasicCancelFrame::create($consumerTag, $noWait); |
| 761 |
|
$outputFrame->frameChannelId = $this->id; |
| 762 |
|
$this->connection->command($outputFrame); |
| 763 |
|
} |
| 764 |
|
|
| 765 |
|
/** |
| 766 |
|
* get message from queue |
|
@@ 798-805 (lines=8) @@
|
| 795 |
|
* @throws \InvalidArgumentException |
| 796 |
|
* @throws \PHPDaemon\Clients\AMQP\Driver\Protocol\Exception\AMQPProtocolException |
| 797 |
|
*/ |
| 798 |
|
public function ack($deliveryTag, array $options = []) |
| 799 |
|
{ |
| 800 |
|
$multiple = array_key_exists('multiple', $options) ? (int)$options['multiple'] : null; |
| 801 |
|
|
| 802 |
|
$outputFrame = Basic\BasicAckFrame::create($deliveryTag, $multiple); |
| 803 |
|
$outputFrame->frameChannelId = $this->id; |
| 804 |
|
$this->connection->command($outputFrame); |
| 805 |
|
} |
| 806 |
|
|
| 807 |
|
/** |
| 808 |
|
* Nack message |
|
@@ 833-840 (lines=8) @@
|
| 830 |
|
* @throws \InvalidArgumentException |
| 831 |
|
* @throws \PHPDaemon\Clients\AMQP\Driver\Protocol\Exception\AMQPProtocolException |
| 832 |
|
*/ |
| 833 |
|
public function reject($deliveryTag, array $options = []) |
| 834 |
|
{ |
| 835 |
|
$requeue = array_key_exists('requeue', $options) ? $options['requeue'] : null; |
| 836 |
|
|
| 837 |
|
$outputFrame = Basic\BasicRejectFrame::create($deliveryTag, $requeue); |
| 838 |
|
$outputFrame->frameChannelId = $this->id; |
| 839 |
|
$this->connection->command($outputFrame); |
| 840 |
|
} |
| 841 |
|
|
| 842 |
|
/** |
| 843 |
|
* Redeliver unacknowledged messages. |