Skip Headers
Oracle® Objects for OLE Developer's Guide
11g Release 2 (11.2) for Microsoft Windows

Part Number E17727-03
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Index
Go to Feedback page
Contact Us

Go to previous page
Go to next page
PDF · Mobi · ePub

MonitorStart (OraAQ) Method

Applies To

OraAQ Object


Starts a monitor thread for dequeuing the messages specified.


Q.MonitorStart NotificationHandler, CallbackCtx, MsgFilterVal,MsgFilter


The arguments for the method are:

Arguments Description
[in] NotificationHandler An IDispatch interface containing the callback method (NotifyMe) which should be notified of new messages.
[in] CallbackCtx Context-specific information that the application wants to pass to the NotifyMe method. This is passed into the NotifyMe method whenever a new message satisfying the user criteria is dequeued.
[in] [optional] MsgFilterVal A byte array containing a value for the message filter. Ignored if MsgFilter is ORAAQ_ANY.
[in] [optional] MsgFilter An Integer constant specifying the selection criteria for messages. Possible values for MsgFilter are:
  • ORAAQ_ANY = 0 - Invokes the callback for any message that arrives on the queue. This is the default value.

  • ORAAQ_CONSUMER = 1 - Invokes the callback when the message intended for the consumer given in the MsgFilterValue is dequeued.

  • ORAAQ_MSGID = 2 - Invokes the callback when message with the identifier specified in MsgFilterVal is dequeued.


NotifyMe is the callback method of the notification object. The syntax of the method is:

Public Sub NotifyMe (ByVal Ctx As Variant, ByVal Msgid As Variant)
Variants Description
[in] Ctx Value passed into the MonitorStart method by the application. Context-sensitive information that the application wants to pass in when messages are dequeued.
[in] Msgid The message ID of the newly dequeued message. The Msgid variant is null when there is an error while monitoring.

By default, the message is passed into NotifyMe in Remove mode. The default dequeue options can be overridden by setting the properties of this instance (OraAQ).

The MonitorStart method returns ORAAQ_SUCCESS or ORAAQ_FAIL.