Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » QAnywhere » Creating QAnywhere Applications » Writing QAnywhere client applications » Receiving QAnywhere messages

 

Receiving messages using a selector

You can use message selectors to select messages for receiving. A message selector is a SQL-like expression that specifies a condition to select a subset of messages to consider for receive operations.

The syntax and semantics of message selectors are exactly the same as the condition part of transmission rules.

See Condition syntax.

Example

The following C# example gets the next message from receiveQueue that has a message property called intprop with value 1.

msg = receiver.GetMessageBySelectorNoWait( 
   receiveQueue, "intprop=1" );

The following C++ example gets the next message from receiveQueue that has a message property called intprop with value 1.

msg = receiver->getMessageBySelectorNoWait(
  receiveQueue, "intprop=1" );

The following Java example gets the next message from receiveQueue that has a message property called intprop with value 1.

msg = receiver.getMessageBySelectorNoWait(
  receiveQueue, "intprop=1");
See also