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

SQL Anywhere 10.0.1 » QAnywhere » QAnywhere .NET API Reference » iAnywhere.QAnywhere.Client namespace (.NET 1.0) » QAManagerBase interface

SetMessageListener method Next Page

SetMessageListener2 method

Sets a MessageListener2 delegate delegate to receive QAnywhere messages asynchronously.


Visual Basic
Public Sub SetMessageListener2( _
ByVal address As String, _
ByVal listener As MessageListener2 _

public void SetMessageListener2(
string address,
MessageListener2 listener


Use this method to receive message asynchronously.

MessageListener2 delegate accepts QAManagerBase and QAMessage parameters.

The SetMessageListener2 address parameter specifies a local queue name used to receive the message. You can only have one listener delegate assigned to a given queue. You may set an ExceptionListener2 and a MessageListener2 for a given address, but you must be consistent with the Listener/Listener2 delegates. That is, you cannot set an ExceptionListener and a MessageListener2, nor an ExceptionListener2 and a MessageListener, for the same address.

If you want to listen for QAnywhere system messages, including push notifications and network status changes, specify "system" as the queue name.

For more information, see Receiving messages asynchronously.