Acknowledge message.

 @param [Integer] delivery_tag Delivery tag to acknowledge
 @param [Boolean] multiple (false) Should all unacknowledged messages up to this be acknowleded as well?

 @return nil
 @api public
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
763005
def __recv_cb(self, msg):
        
        try:
            self.__msg_callback(msg)
        except:
            logger.exception("AmqpLink.__recv_cb exception calling msg_callback")
        finally:
            # only works if all messages handled in series
            self.__last_id = msg.delivery_tag
            self.__unacked += 1
744034
def reject(self, delivery_tag, requeue=False):
        '''
        
        '''
        args = Writer()
        args.write_longlong(delivery_tag).\
            write_bit(requeue)

        self.send_frame(MethodFrame(self.channel_id, 60, 90, args))
732685
@Override
    public void acknowledge(SQSMessage message) throws JMSException {
        session.checkClosed();
        amazonSQSClient.deleteMessage(new DeleteMessageRequest(
                message.getQueueUrl(), message.getReceiptHandle()));
        unAckMessages.remove(message.getReceiptHandle());
    }
3675
def pending_confirmations(self):
        
        return sorted([(idx, msg)
                       for idx, msg in enumerate(self.published_messages)
                       if not msg.future.done()],
                      key=lambda x: x[1].delivery_tag)
456360
public function sendGraphTextByTag($tag_id, $media_id, $is_to_all = false, $send_ignore_reprint = 1, $clientmsgid = '')
    {
        $ret = array();
        $ret['filter']['tag_id'] = $tag_id;
        $ret['filter']['is_to_all'] = $is_to_all;
        $ret['msgtype'] = 'mpnews';
        $ret['mpnews']['media_id'] = $media_id;
        $ret['send_ignore_reprint'] = $send_ignore_reprint;
        $ret['clientmsgid'] = $clientmsgid;
        
        return $this->sendAll($ret);
    }
872764
def ack(self, msg):
        
        message_id = msg['headers']['message-id']
        subscription = msg['headers']['subscription']

        transaction_id = None
        if 'transaction-id' in msg['headers']:
            transaction_id = msg['headers']['transaction-id']

#        print "acknowledging message id <%s>." % message_id

        return ack(message_id, subscription, transaction_id)
646298
protected function internal_ack_handler($delivery_tag, $multiple, $handler)
    {
        if ($multiple) {
            $keys = $this->get_keys_less_or_equal($this->published_messages, $delivery_tag);

            foreach ($keys as $key) {
                $this->internal_ack_handler($key, false, $handler);
            }

        } else {
            $message = $this->get_and_unset_message($delivery_tag);
            $message->delivery_info['delivery_tag'] = $delivery_tag;
            $this->dispatch_to_handler($handler, array($message));
        }
    }
1161010
def bump_patch_tag tag
      @v[:build] = '0' unless build.nil?
      if patch_tag.nil?
        @v[:patch] = patch.succ
        return @v[:patch_tag] = tag
      elsif patch_tag.start_with? tag
        # ensure tag ends with number
        if patch_tag !~ %r{\d+$}
          @v[:patch_tag] = patch_tag + '1' # required for succ to work
        end
        # increment this tag
        @v[:patch_tag] = patch_tag.succ
      else
        @v[:patch_tag] = tag # replace tag
      end
    end
761070
def mark_received(self, visibility_timeout=None):
        
        if visibility_timeout:
            visibility_timeout = int(visibility_timeout)
        else:
            visibility_timeout = 0

        if not self.approximate_first_receive_timestamp:
            self.approximate_first_receive_timestamp = int(unix_time_millis())

        self.approximate_receive_count += 1

        # Make message visible again in the future unless its
        # destroyed.
        if visibility_timeout:
            self.change_visibility(visibility_timeout)

        self.receipt_handle = generate_receipt_handle()
335372
function _handleTags(username, tags, cb) {
    var self = this;

    self.userData = tags;
    self.userData.username = username;
    self.userData.special = [];

    if (typeof tags['emotes'] === 'string') {
        var emoticons = tags['emotes'].split('/');
        var emotes = {};

        for (var i = 0; i < emoticons.length; i++) {
            var parts = emoticons[i].split(':');
            emotes[parts[0]] = parts[1].split(',');
        }
        self.userData.emote = emotes;
    }

    if (tags['subscriber'] === '1') { self.userData.special.push('subscriber'); }
    if (tags['turbo'] === '1') { self.userData.special.push('turbo'); }
    if (typeof tags['user_type'] === 'string') { self.userData.special.push(tags['user_type']); }

    if (typeof cb == "function") {
        return cb(self.userData);
    }
}
488234
def tag(self, name, action='ADD', params=None):
        
        if not name:
            self._tcex.handle_error(925, ['name', 'tag', 'name', 'name', name])

        if not self.can_update():
            self._tcex.handle_error(910, [self.type])

        if action in ['GET', 'ADD', 'DELETE']:
            return self.tc_requests.tag(
                self.api_type,
                self.api_sub_type,
                self.unique_id,
                name,
                action=action,
                owner=self.owner,
                params=params,
            )
        self._tcex.handle_error(925, ['action', 'tag', 'action', 'action', action])
        return None
806660
@Override
    public void acknowledge(SQSMessage message) throws JMSException {
        session.checkClosed();

        SQSMessageIdentifier ackMessage = SQSMessageIdentifier.fromSQSMessage(message);

        int indexOfMessage = indexOf(ackMessage);

        /**
         * In case the message has already been deleted, warn user about it and
         * return. If not then then it should continue with acknowledging all
         * the messages received before that
         */
        if (indexOfMessage == -1) {
            LOG.warn("SQSMessageID: " + message.getSQSMessageId() + " with SQSMessageReceiptHandle: " +
                     message.getReceiptHandle() + " does not exist.");
        } else {
            bulkAction(getUnAckMessages(), indexOfMessage);
        }
    }
581080
def acknowledged_by(self):
        """"""
        if (self.is_acknowledged and
                self._proto.acknowledgeInfo.HasField('acknowledgedBy')):
            return self._proto.acknowledgeInfo.acknowledgedBy
        return None
1002898
def deliver(event)
      info do
        perform_deliveries = event.payload[:perform_deliveries]
        if perform_deliveries
          "Delivered mail #{event.payload[:message_id]} (#{event.duration.round(1)}ms)"
        else
          "Skipped delivery of mail #{event.payload[:message_id]} as `perform_deliveries` is false"
        end
      end

      debug { event.payload[:mail] }
    end
1179220
def interpret_association_accept(message)
      info = Hash.new
      msg = Stream.new(message, @net_endian)
      # Protocol version (2 bytes)
      info[:protocol_version] = msg.decode(2, "HEX")
      # Reserved (2 bytes)
      msg.skip(2)
      # Called AE (shall be identical to the one sent in the request, but not tested against) (16 bytes)
      info[:called_ae] = msg.decode(16, "STR")
      # Calling AE (shall be identical to the one sent in the request, but not tested against) (16 bytes)
      info[:calling_ae] = msg.decode(16, "STR")
      # Reserved (32 bytes)
      msg.skip(32)
      # APPLICATION CONTEXT:
      # Item type (1 byte)
      info[:application_item_type] = msg.decode(1, "HEX")
      # Reserved (1 byte)
      msg.skip(1)
      # Application item length (2 bytes)
      info[:application_item_length] = msg.decode(2, "US")
      # Application context (variable length)
      info[:application_context] = msg.decode(info[:application_item_length], "STR")
      # PRESENTATION CONTEXT:
      # As multiple presentation contexts may occur, we need a loop to catch them all:
      # Each presentation context hash will be put in an array, which will be put in the info hash.
      presentation_contexts = Array.new
      pc_loop = true
      while pc_loop do
        # Item type (1 byte)
        item_type = msg.decode(1, "HEX")
        if item_type == ITEM_PRESENTATION_CONTEXT_RESPONSE
          pc = Hash.new
          pc[:presentation_item_type] = item_type
          # Reserved (1 byte)
          msg.skip(1)
          # Presentation item length (2 bytes)
          pc[:presentation_item_length] = msg.decode(2, "US")
          # Presentation context ID (1 byte)
          pc[:presentation_context_id] = msg.decode(1, "BY")
          # Reserved (1 byte)
          msg.skip(1)
          # Result (& Reason) (1 byte)
          pc[:result] = msg.decode(1, "BY")
          process_result(pc[:result])
          # Reserved (1 byte)
          msg.skip(1)
          # Transfer syntax sub-item:
          # Item type (1 byte)
          pc[:transfer_syntax_item_type] = msg.decode(1, "HEX")
          # Reserved (1 byte)
          msg.skip(1)
          # Transfer syntax item length (2 bytes)
          pc[:transfer_syntax_item_length] = msg.decode(2, "US")
          # Transfer syntax name (variable length)
          pc[:transfer_syntax] = msg.decode(pc[:transfer_syntax_item_length], "STR")
          presentation_contexts << pc
        else
          # Break the presentation context loop, as we have probably reached the next stage, which is user info. Rewind:
          msg.skip(-1)
          pc_loop = false
        end
      end
      info[:pc] = presentation_contexts
      # USER INFORMATION:
      # Item type (1 byte)
      info[:user_info_item_type] = msg.decode(1, "HEX")
      # Reserved (1 byte)
      msg.skip(1)
      # User information item length (2 bytes)
      info[:user_info_item_length] = msg.decode(2, "US")
      while msg.index < msg.length do
        # Item type (1 byte)
        item_type = msg.decode(1, "HEX")
        # Reserved (1 byte)
        msg.skip(1)
        # Item length (2 bytes)
        item_length = msg.decode(2, "US")
        case item_type
          when ITEM_MAX_LENGTH
            info[:max_pdu_length] = msg.decode(item_length, "UL")
            @max_receive_size = info[:max_pdu_length]
          when ITEM_IMPLEMENTATION_UID
            info[:implementation_class_uid] = msg.decode(item_length, "STR")
          when ITEM_MAX_OPERATIONS_INVOKED
            # Asynchronous operations window negotiation (PS 3.7: D.3.3.3) (2*2 bytes)
            info[:maxnum_operations_invoked] = msg.decode(2, "US")
            info[:maxnum_operations_performed] = msg.decode(2, "US")
          when ITEM_ROLE_NEGOTIATION
            # SCP/SCU Role Selection Negotiation (PS 3.7 D.3.3.4)
            # Note: An association response may contain several instances of this item type (each with a different abstract syntax).
            uid_length = msg.decode(2, "US")
            role = Hash.new
            # SOP Class UID (Abstract syntax):
            role[:sop_uid] = msg.decode(uid_length, "STR")
            # SCU Role (1 byte):
            role[:scu] = msg.decode(1, "BY")
            # SCP Role (1 byte):
            role[:scp] = msg.decode(1, "BY")
            if info[:role_negotiation]
              info[:role_negotiation] << role
            else
              info[:role_negotiation] = [role]
            end
          when ITEM_IMPLEMENTATION_VERSION
            info[:implementation_version] = msg.decode(item_length, "STR")
          else
            # Value (variable length)
            value = msg.decode(item_length, "STR")
            logger.warn("Unknown user info item type received. Please update source code or contact author. (item type: #{item_type})")
        end
      end
      stop_receiving
      info[:valid] = true
      return info
    end
1368463
def reject(opts = {})
      @server.send(Protocol::Basic::Reject.new(opts.merge(:delivery_tag => properties[:delivery_tag])))
    end