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 C++ API 参考 » QAManagerBase 类

 

getMessageBySelectorTimeout 函数

语法
QAMessage * QAManagerBase::getMessageBySelectorTimeout(
  qa_const_string address,
  qa_const_string selector,
  qa_long timeout
)
参数
  • address   目标。

  • selector   选择程序。

  • timeout   最长等待时间,以毫秒为单位

注释

返回下一个发送到给定地址并满足给定选择程序的可用 QAMessage。

address 参数指定本地队列名称。地址可以采用 'store-id\queue-name' 或 'queue-name' 的形式。如果没有可用消息,此方法等待指定的超时时间,然后返回。使用此方法同步接收消息。

有关异步接收消息(使用消息事件处理程序)的详细信息,请参见异步接收消息

返回值

返回下一条 QAMessage,如果没有可用消息,则返回空值。