PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

AMQPChannel::setPrefetchCount

(PECL amqp >= Unknown)

AMQPChannel::setPrefetchCountSet the number of messages to prefetch from the broker

Description

public void AMQPChannel::setPrefetchCount ( int $count )

Set the number of messages to prefetch from the broker during a call to AMQPQueue::consume or AMQPQueue::get. Any call to this method will automatically set the prefetch window size to 0, meaning that the prefetch window size 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.

Parameters

count

The number of messages to prefetch.

Errors/Exceptions

Throws AMQPConnectionException if the connection to the broker was lost.

Return Values

Returns TRUE on success or FALSE on failure.

PHP Manual