<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Set the window size to prefetch from the broker</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="amqpchannel.setprefetchcount.html">AMQPChannel::setPrefetchCount</a></div> <div class="next" style="text-align: right; float: right;"><a href="amqpchannel.starttransaction.html">AMQPChannel::startTransaction</a></div> <div class="up"><a href="class.amqpchannel.html">AMQPChannel</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="amqpchannel.setprefetchsize" class="refentry"> <div class="refnamediv"> <h1 class="refname">AMQPChannel::setPrefetchSize</h1> <p class="verinfo">(PECL amqp >= Unknown)</p><p class="refpurpose"><span class="refname">AMQPChannel::setPrefetchSize</span> — <span class="dc-title">Set the window size to prefetch from the broker</span></p> </div> <div class="refsect1 description" id="refsect1-amqpchannel.setprefetchsize-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>AMQPChannel::setPrefetchSize</strong></span> ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$size</code></span> )</div> <p class="para rdfs-comment"> Set the prefetch window size, in octets, during a call to <span class="methodname"><a href="amqpqueue.consume.html" class="methodname">AMQPQueue::consume()</a></span> or <span class="methodname"><a href="amqpqueue.get.html" class="methodname">AMQPQueue::get()</a></span>. Any call to this method will automatically set the prefetch message count to 0, meaning that the prefetch message count setting will be ignored. </p> <p class="para"> If the call to either <span class="methodname"><a href="amqpqueue.consume.html" class="methodname">AMQPQueue::consume()</a></span> or <span class="methodname"><a href="amqpqueue.get.html" class="methodname">AMQPQueue::get()</a></span> is done with the <strong><code>AMQP_AUTOACK</code></strong> flag set, this setting will be ignored. </p> </div> <div class="refsect1 parameters" id="refsect1-amqpchannel.setprefetchsize-parameters"> <h3 class="title">Parameters</h3> <dl> <dt> <span class="term"><em><code class="parameter">size</code></em></span> <dd> <p class="para"> The window size, in octets, to prefetch. </p> </dd> </dt> </dl> </div> <div class="refsect1 errors" id="refsect1-amqpchannel.setprefetchsize-errors"> <h3 class="title">Errors/Exceptions</h3> <p class="para"> Throws <strong class="classname">AMQPConnectionException</strong> if the connection to the broker was lost. </p> </div> <div class="refsect1 returnvalues" id="refsect1-amqpchannel.setprefetchsize-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure. </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="amqpchannel.setprefetchcount.html">AMQPChannel::setPrefetchCount</a></div> <div class="next" style="text-align: right; float: right;"><a href="amqpchannel.starttransaction.html">AMQPChannel::startTransaction</a></div> <div class="up"><a href="class.amqpchannel.html">AMQPChannel</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>