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_getaddress

返回消息的 QAnywhere 地址。

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

VARCHAR(128) 形式的 QAnywhere 消息地址。QAnywhere 消息地址的格式为 id\queue-name

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

另请参见
示例

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

begin
    declare @msgid varchar(128);
    declare @addr varchar(128);
    set @msgid = ml_qa_getmessage( 'myaddress' );
    set @addr = ml_qa_getaddress( @msgid );
    message 'message to address ' || @addr || ' received';
    commit;
end