@@ 155-162 (lines=8) @@ | ||
152 | * @throws \InvalidArgumentException |
|
153 | * @throws \PHPDaemon\Clients\AMQP\Driver\Protocol\Exception\AMQPProtocolException |
|
154 | */ |
|
155 | public function nack($multiple = null, $requeue = null) |
|
156 | { |
|
157 | $this->checkChannel(); |
|
158 | ||
159 | $outputFrame = BasicNackFrame::create($this->tag, $multiple, $requeue); |
|
160 | $outputFrame->frameChannelId = $this->channel->getId(); |
|
161 | $this->channel->getConnection()->command($outputFrame); |
|
162 | } |
|
163 | ||
164 | /** |
|
165 | * Reject the message and requeue it. |
|
@@ 175-185 (lines=11) @@ | ||
172 | * @throws \PHPDaemon\Clients\AMQP\Driver\Protocol\Exception\AMQPProtocolException |
|
173 | * @throws \PHPDaemon\Clients\AMQP\Driver\Exception\AMQPMessageException |
|
174 | */ |
|
175 | public function reject($requeue = true) |
|
176 | { |
|
177 | $this->checkChannel(); |
|
178 | ||
179 | $outputFrame = BasicRejectFrame::create($this->tag, $requeue); |
|
180 | $outputFrame->frameChannelId = $this->channel->getId(); |
|
181 | if (null !== $requeue) { |
|
182 | $outputFrame->requeue = $requeue; |
|
183 | } |
|
184 | $this->channel->getConnection()->command($outputFrame); |
|
185 | } |
|
186 | ||
187 | /** |
|
188 | * Get the length of the message content, in bytes. |