GetMessageBySelectorTimeout method

Returns the next available QAMessage sent to the given address that satisfies the given selector.

Syntax
Visual Basic
Public Function GetMessageBySelectorTimeout( _
   ByVal address As String, _
   ByVal selector As String, _
   ByVal timeout As Long _
) As QAMessage
C#
public QAMessage GetMessageBySelectorTimeout(
   string  address,
   string  selector,
   long timeout
);
Parameters
  • address   Specifies the queue name used by the QAnywhere client to receive messages.

  • selector   The selector.

  • timeout   The time to wait, in milliseconds, for a message to become available.

Return value

The next QAMessage, or null if no message is available.

Remarks

The address parameter specifies a local queue name. The address can be in the form store-id\queue-name or queue-name. If no message is available, this method waits for the specified timeout and then returns. Use this method to receive messages synchronously.

For more information about receiving messages asynchronously (using a message event handler), see Receiving messages asynchronously.

Exceptions
See also