AMQPChannel::setConfirmCallback PHP Метод

setConfirmCallback() публичный Метод

Set callback to process basic.ack and basic.nac AMQP server methods (applicable when channel in confirm mode).
public setConfirmCallback ( callable $ack_callback = null, callable $nack_callback = null )
$ack_callback callable
$nack_callback callable Callback functions with all arguments have the following signature: function ack_callback(int $delivery_tag, bool $multiple) : bool; function nack_callback(int $delivery_tag, bool $multiple, bool $requeue) : bool; and should return boolean false when wait loop should be canceled. Note, basic.nack server method will only be delivered if an internal error occurs in the Erlang process responsible for a queue (see https://www.rabbitmq.com/confirms.html for details).
    public function setConfirmCallback(callable $ack_callback = null, callable $nack_callback = null)
    {
    }

Usage Example

Пример #1
0
 /**
  * @inheritdoc
  */
 public function setConfirmCallback(callable $ackCallback = null, callable $nackCallback = null)
 {
     $this->channel->setConfirmCallback($ackCallback, $nackCallback);
 }