Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » QAnywhere » QAnywhere 参考 » QAnywhere SQL API 参考 » 消息属性、标头和内容 » 消息标头

 

ml_qa_getinreplytoid

返回消息的回复 ID。

参数
说明 注释
1 消息 ID VARCHAR(128)。可从 ml_qa_createmessage 或 ml_qa_getmessage 获取消息 ID。
返回值

VARCHAR(128) 形式的回复 ID。

注释

客户端可使用 InReplyToID 标头字段,将一条消息与另一条消息相链接。典型应用是将响应消息与其请求消息相链接。

回复 ID 是此消息将回复的消息的 ID。

接收消息后就可以读取此标头,一直到执行回退或提交;执行回退或提交后就不能再读取此标头。

另请参见
示例

在下面的示例中,收到一条消息,并将消息的回复 ID 输出到数据库服务器消息窗口:

begin
    declare @msgid varchar(128);
    declare @inreplytoid varchar(128);
    set @msgid = ml_qa_getmessage( 'myaddress' );
    set @inreplytoid = ml_qa_getinreplytoid( @msgid );
    message 'message is likely a reply to the message with id ' || @inreplytoid;
    commit;
end