设置消息到期时间。
项 | 说明 | 注释 |
---|---|---|
1 | 消息 ID | VARCHAR(128)。可从 ml_qa_createmessage 或 ml_qa_getmessage 获取消息 ID。 |
2 | 到期时间 | TIMESTAMP |
接收消息后就可以读取此标头,一直到执行回退或提交;执行回退或提交后就不能再读取此标头。
在下面的示例中,创建一条消息,如果在随后的 3 天内未传送,则该消息到期:
begin declare @msgid varchar(128); set @msgid = ml_qa_createmessage(); call ml_qa_setexpiration( @msgid, dateadd( day, 3, current timestamp ) ); call ml_qa_settextcontent( @msgid, 'time-limited offer' ); call ml_qa_putmessage( @msgid, 'clientid\queuename' ); commit; end |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |