setPrefetchSize() public method

Set the prefetch window size, in octets, during a call to AMQPQueue::consume() or AMQPQueue::get(). Any call to this method will automatically set the prefetch message count to 0, meaning that the prefetch message count setting will be ignored. If the call to either AMQPQueue::consume() or AMQPQueue::get() is done with the AMQP_AUTOACK flag set, this setting will be ignored.
public setPrefetchSize ( integer $size ) : boolean
$size integer The window size, in octets, to prefetch.
return boolean TRUE on success or FALSE on failure.
コード例 #1
0
ファイル: Channel.php プロジェクト: csharpru/yii2-amqp
 /**
  * @param $size
  *
  * @return bool
  */
 public function setPrefetchSize($size)
 {
     try {
         return $this->rawChannel->setPrefetchSize($size);
     } catch (\AMQPConnectionException $e) {
         ClientHelper::throwRightException($e);
     }
 }
コード例 #2
0
ファイル: Channel.php プロジェクト: prolic/HumusAmqp
 /**
  * @inheritdoc
  */
 public function setPrefetchSize(int $size)
 {
     $this->channel->setPrefetchSize($size);
 }