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_setpriority

设置消息优先级。

参数
说明 注释
1 消息 ID VARCHAR(128)。可从 ml_qa_createmessage 或 ml_qa_getmessage 获取消息 ID。
2 优先级 INTEGER
注释

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

消息发送后就不能再更改此标头。

另请参见
示例

下面的示例发送了一条高优先级消息:

begin
    declare @msgid varchar(128);
    set @msgid = ml_qa_createmessage();
    call ml_qa_setpriority( @msgid, 9 );
    call ml_qa_settextcontent( @msgid, 'priority content' );
    call ml_qa_putmessage( @msgid, 'clientid\queuename' );
    commit;
end