Message-Id header
180089
function do_msgid_header (cb) {
        const msgid = trans.header.get('message-id');
        const mmatch = /@([^>]+)>/.exec(msgid);
        if (mmatch) {
            return plugin.do_lookups(connection, cb, mmatch[1], 'msgid');
        }
        cb();
    }
1055796
def get_message_id(message):
    """"""
    if message is None:
        return None

    if isinstance(message, int):
        return message

    try:
        if message.SUBCLASS_OF_ID == 0x790009e3:
            # hex(crc32(b'Message')) = 0x790009e3
            return message.id
    except AttributeError:
        pass

    raise TypeError('Invalid message type: {}'.format(type(message)))
1014709
private static String getServerIdString(String id) {

        if (id.contains(CmsADEManager.CLIENT_ID_SEPERATOR)) {
            id = id.substring(0, id.indexOf(CmsADEManager.CLIENT_ID_SEPERATOR));
        }
        return id;
    }
500191
async def cmd_id(message: types.Message):
    
    if message.reply_to_message:
        target = message.reply_to_message.from_user
        chat = message.chat
    elif message.forward_from and message.chat.type == ChatType.PRIVATE:
        target = message.forward_from
        chat = message.forward_from or message.chat
    else:
        target = message.from_user
        chat = message.chat

    result_msg = [hbold('Info about user:'),
                  f"First name: {target.first_name}"]
    if target.last_name:
        result_msg.append(f"Last name: {target.last_name}")
    if target.username:
        result_msg.append(f"Username: {target.mention}")
    result_msg.append(f"User ID: {target.id}")

    result_msg.extend([hbold('Chat:'),
                       f"Type: {chat.type}",
                       f"Chat ID: {chat.id}"])
    if chat.type != ChatType.PRIVATE:
        result_msg.append(f"Title: {chat.title}")
    else:
        result_msg.append(f"Title: {chat.full_name}")
    return SendMessage(message.chat.id, '\n'.join(result_msg), reply_to_message_id=message.message_id,
                       parse_mode=ParseMode.HTML)
807228
@Deprecated
    public static void addHeader(HttpMessage message, String name, Object value) {
        message.headers().add(name, value);
    }
425643
def defines(self, id, domain='messages'):
        
        assert isinstance(id, (str, unicode))
        assert isinstance(domain, (str, unicode))

        return id in self.messages.get(domain, {})
1171444
function setMessageIdsAndSeqNos(state, messageIdsAndSeqNos) {
  const {ids, keys, seqNos} = messageIdsAndSeqNos || {};

  setIds(state, ids);
  setKeys(state, keys);
  setSeqNos(state, seqNos);

  return state;
}
1075227
def req(self, message_id, timeout):
        ''''''
        return self.send(constants.REQ + ' ' + message_id + ' ' + str(timeout))
726163
private static void addHeadersToMessage(SipServletMessage message, Map<String, String> customHeaders) {
         for (Map.Entry<String, String> entry: customHeaders.entrySet()) {
             String headerName = entry.getKey();
             String headerVal = entry.getValue();
             message.addHeader(headerName, headerVal);
         }
     }
1115110
def handle_id_request(msg):
    """"""
    node_id = msg.gateway.add_sensor()
    return msg.copy(
        ack=0, sub_type=msg.gateway.const.Internal['I_ID_RESPONSE'],
        payload=node_id) if node_id is not None else None
331053
function postMessageToNode(messageId) {
        var msg = {
            fn: messageId,
            args: getFunctionArgs(arguments),
            requester: domainID
        };
        updateDomain.exec('data', msg);
    }
777785
def _bot_identifier(self, message):
        

        text = message['text']

        formatters = [
            lambda identifier: "%s " % identifier,
            lambda identifier: "%s:" % identifier,
        ]
        my_identifiers = [formatter(identifier) for identifier in [self.name, self.my_mention] for formatter in formatters]

        for identifier in my_identifiers:
            if text.startswith(identifier):
                self.log.debug("sent to me:\n%s", pprint.pformat(message))
                return identifier

        return None
1245703
def hash(ctx, message_id, message):
    
    conf = Config(message_id=message_id)

    mail = Mail(message, conf)

    logger.info(mail.header_text)
    logger.info('-' * 70)
    logger.info('Hash: {}'.format(mail.hash_key))
425303
def encode_id_header(resource):
    
    if not hasattr(resource, "id"):
        return {}

    return {
        "X-{}-Id".format(
            camelize(name_for(resource))
        ): str(resource.id),
    }
874374
public function getMessageId()
    {
        $messageId = $this->getParameter('messageId');

        if (empty($messageId)) {
            $this->setMessageId(substr(md5(microtime()), 0, 30));
        }

        return $this->getParameter('messageId');
    }
268309
public static void checkMessageId(int messageId, AisMessageType... messageTypes) {
		boolean found = false;
		for (AisMessageType messageType : messageTypes) {
			if (messageType.getId() == messageId)
				found = true;
		}
		if (!found) {
			StringBuffer s = new StringBuffer();
			for (AisMessageType messageType : messageTypes) {
				if (s.length() > 0)
					s.append(",");
				s.append(messageType.getId() + "");
			}
			checkArgument(found, "messageId must be in [" + s + "]  but was " + messageId);
		}
	}
237615
def on_before_publish_insert_request_id_header(headers, **kwargs):
    
    if _CELERY_X_HEADER not in headers:
        request_id = current_request_id()
        headers[_CELERY_X_HEADER] = request_id
        logger.debug("Forwarding request_id '{}' to the task consumer.".format(request_id))