<!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>Mark a message as explicitly not acknowledged.</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="amqpqueue.getname.html">AMQPQueue::getName</a></div> <div class="next" style="text-align: right; float: right;"><a href="amqpqueue.purge.html">AMQPQueue::purge</a></div> <div class="up"><a href="class.amqpqueue.html">AMQPQueue</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="amqpqueue.nack" class="refentry"> <div class="refnamediv"> <h1 class="refname">AMQPQueue::nack</h1> <p class="verinfo">(PECL amqp >= Unknown)</p><p class="refpurpose"><span class="refname">AMQPQueue::nack</span> — <span class="dc-title">Mark a message as explicitly not acknowledged.</span></p> </div> <div class="refsect1 description" id="refsect1-amqpqueue.nack-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>AMQPQueue::nack</strong></span> ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$delivery_tag</code></span> [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$flags</code><span class="initializer"> = <strong><code>AMQP_NOPARAM</code></strong></span></span> ] )</div> <p class="para rdfs-comment"> Mark the message identified by <em><code class="parameter">delivery_tag</code></em> as explicitly not acknowledged. This method can only be called on messages that have not yet been acknowledged, meaning that messages retrieved with by <span class="methodname"><a href="amqpqueue.consume.html" class="methodname">AMQPQueue::consume()</a></span> and <span class="methodname"><a href="amqpqueue.get.html" class="methodname">AMQPQueue::get()</a></span> and using the <strong><code>AMQP_AUTOACK</code></strong> flag are not eligible. </p> <p class="para"> When called, the broker will immediately put the message back onto the queue, instead of waiting until the connection is closed. </p> <p class="para"> This method is only supported by the RabbitMQ broker. The behavior of calling this method while connected to any other broker is undefined. </p> </div> <div class="refsect1 parameters" id="refsect1-amqpqueue.nack-parameters"> <h3 class="title">Parameters</h3> <dl> <dt> <span class="term"><em><code class="parameter">delivery_tag</code></em></span> <dd> <p class="para"> The delivery tag by which to identify the message. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">flags</code></em></span> <dd> <p class="para"> A bitmask of flags. </p> </dd> </dt> </dl> </div> <div class="refsect1 errors" id="refsect1-amqpqueue.nack-errors"> <h3 class="title">Errors/Exceptions</h3> <p class="para"> Throws <strong class="classname">AMQPChannelException</strong> if the channel is not open. </p> <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-amqpqueue.nack-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="amqpqueue.getname.html">AMQPQueue::getName</a></div> <div class="next" style="text-align: right; float: right;"><a href="amqpqueue.purge.html">AMQPQueue::purge</a></div> <div class="up"><a href="class.amqpqueue.html">AMQPQueue</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>