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_getpriority

返回消息的优先级级别。

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

INTEGER 形式的优先级级别。

注释

QAnywhere API 定义十种级别的优先级值,0 代表最低优先级,9 代表最高优先级。客户端应将优先级 0-4 视为普通优先级等级,将优先级 5-9 视为加速优先级等级。

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

另请参见
示例

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

begin
    declare @msgid varchar(128);
    declare @priority integer;
    set @msgid = ml_qa_getmessage( 'myaddress' );
    set @priority = ml_qa_getpriority( @msgid );
    message 'a message with priority ' || @priority || ' has been received';
    commit;
end