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_gettimestamp

返回消息创建时间。

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

TIMESTAMP 形式的消息创建时间。

注释

Timestamp 标头字段包含消息的创建时间。时间为协调通用时间 (UTC)。它不是消息实际传输的时间,因为事务或其它客户端消息排队可能导致实际发送推迟。

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

另请参见
示例

在下面的示例中,收到一条消息,并将消息创建时间输出到数据库服务器消息窗口:

begin
    declare @msgid varchar(128);
    declare @ts timestamp;
    set @msgid = ml_qa_getmessage( 'myaddress' );
    set @ts = ml_qa_gettimestamp( @msgid );
    message 'message received with create time: ' || @ts ;
    commit;
end