reject an incoming message

@param $deliveryTag
@param $reQueue
978357
public function basicReject($deliveryTag, $reQueue)
    {
        $args = $this->frameBuilder->basicReject($deliveryTag, $reQueue);
        $this->sendMethodFrame(array(60, 90), $args);
    }
423671
def ack(delivery_tag, multiple = false)
      if multiple
        @acknowledged_state[:pending].keys.each do |key|
          ack(key, false) if key <= delivery_tag
        end
      elsif @acknowledged_state[:pending].key?(delivery_tag)
        update_acknowledgement_state(delivery_tag, :acked)
      end
      nil
    end
1141751
public function nack($multiple = null, $requeue = null)
    {
        $this->checkChannel();

        $outputFrame = BasicNackFrame::create($this->tag, $multiple, $requeue);
        $outputFrame->frameChannelId = $this->channel->getId();
        $this->channel->getConnection()->command($outputFrame);
    }
117475
public function ack($deliveryTag, array $options = [])
    {
        $multiple = array_key_exists('multiple', $options) ? (int)$options['multiple'] : null;

        $outputFrame = Basic\BasicAckFrame::create($deliveryTag, $multiple);
        $outputFrame->frameChannelId = $this->id;
        $this->connection->command($outputFrame);
    }
1065339
def reject(self):
        
        if self.acknowledged:
            raise self.MessageStateError(
                "Message already acknowledged with state: %s" % self._state)
        self.backend.reject(self.delivery_tag)
        self._state = "REJECTED"
1007923
@Override
  protected boolean reject(LogItem log) {
    if (whitelistTags != null) {
      for (String enabledTag : whitelistTags) {
        if (log.tag.equals(enabledTag)) {
          return false;
        }
      }
    }
    return true;
  }
504208
public function failure(Exception $e, Delivery $delivery, AbstractListener $listener)
    {
        $listener->resend($delivery);
    }
569091
public function nack($deliveryTag = 0, $multiple = false, $requeue = true)
    {
        return $this->getClient()->nack($this->getChannelId(), $deliveryTag, $multiple, $requeue);
    }
1048177
@Override
	public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
		int counts = rejectCounts.incrementAndGet();
		if(logger.isWarnEnabled()) {
			int t = counts % 100;
			if (t == 0) {
					logger.warn(new StringBuilder().append("Task[").append(message).append("] blocked ").append(counts).append(" times.").toString());
			}
		}
//
		try {
			if(sliceScrollBlockedWaitTimeout <= 0) {
				executor.getQueue().put(r);
			}
			else {
				boolean result = executor.getQueue().offer(r, this.sliceScrollBlockedWaitTimeout, TimeUnit.MILLISECONDS);
				if(!result){
					throw new RejectedExecutionException(new StringBuilder().append("Task[").append(message).append("] rejected: wait timeout after ")
							.append(sliceScrollBlockedWaitTimeout).append(" MILLISECONDS.").toString());
				}
			}
		} catch (InterruptedException e1) {
			throw new RejectedExecutionException(e1);
		}
	}
311744
function reject(oError, vRequest) {
			if (Array.isArray(vRequest)) {
				vRequest.forEach(reject.bind(null, oError));
			} else {
				vRequest.$reject(oError);
			}
		}
737592
def reject(self, message, requeue=True):
        
        if self.no_ack:
            raise RuntimeError('Can not rejected messages when ack is False')

        if message.channel.is_closed:
            LOGGER.warning('Can not nack message, disconnected from RabbitMQ')
            self.counters[self.CLOSED_ON_COMPLETE] += 1
            return

        LOGGER.warning('Rejecting message %s %s requeue', message.delivery_tag,
                       'with' if requeue else 'without')
        message.channel.basic_nack(
            delivery_tag=message.delivery_tag, requeue=requeue)
        self.measurement.set_tag(self.NACKED, True)
        self.measurement.set_tag(self.REQUEUED, requeue)
357651
def interpret_association_reject(message)
      info = Hash.new
      msg = Stream.new(message, @net_endian)
      # Reserved (1 byte)
      msg.skip(1)
      # Result (1 byte)
      info[:result] = msg.decode(1, "BY") # 1 for permanent and 2 for transient rejection
      # Source (1 byte)
      info[:source] = msg.decode(1, "BY")
      # Reason (1 byte)
      info[:reason] = msg.decode(1, "BY")
      logger.warn("ASSOCIATE Request was rejected by the host. Error codes: Result: #{info[:result]}, Source: #{info[:source]}, Reason: #{info[:reason]} (See DICOM PS3.8: Table 9-21 for details.)")
      stop_receiving
      info[:valid] = true
      return info
    end
1041389
protected function basic_ack_from_server(AMQPReader $reader)
    {
        $delivery_tag = $reader->read_longlong();
        $multiple = (bool) $reader->read_bit();

        if (!isset($this->published_messages[$delivery_tag])) {
            throw new AMQPRuntimeException(sprintf(
                'Server ack\'ed unknown delivery_tag "%s"',
                $delivery_tag
            ));
        }

        $this->internal_ack_handler($delivery_tag, $multiple, $this->ack_handler);
    }
98478
private boolean ackNoException(Channel consumerChannel, boolean msgApplied, final long deliveryTag) {
        try {
            if (msgApplied) {
                //设置multiple为true，经过压测发现有一定几率ack出现ioException的情况，这里顺带把前面的消息一起ack掉
                consumerChannel.basicAck(deliveryTag, true);
            } else {
                consumerChannel.basicNack(deliveryTag, false, true);
            }
            return true;
        } catch (Throwable unknownException) {
            LOG.error(unknownException);
            return false;
        }
    }
283685
public function basicAck($deliveryTag, $multiple)
    {
        $args = new Writer();
        $args->writeLongLong($deliveryTag)
            ->writeBit($multiple);
        return $args;
    }
533164
@Override
    public void requeue(Task task) {
        int attempts = task.getAttempts();
        task.incrementAttempts();
        try {
            deleteTask(task);
        } catch (TaskNotFoundException e) {
            log.error("unable to delete " + task + " ignoring - requeuing anyway");
        }

        put(task);
        log.warn("requeued {} after {} failed attempts.", task, attempts);

    }
427499
public function basic_ack($delivery_tag, $multiple = false)
    {
        list($class_id, $method_id, $args) = $this->protocolWriter->basicAck($delivery_tag, $multiple);
        $this->send_method_frame(array($class_id, $method_id), $args);
    }