The OraAQAgent
object represents a message recipient and is only valid for queues that allow multiple consumers.
An OraAQAgent
object can be instantiated by invoking the AQAgent
method. For example:
Set agent = qMsg.AQAgent(name)
The following Visual Basic example illustrates a simple use of the advanced queuing feature. A message of a user-defined type, MESSAGE_TYPE
, is enqueued into a queue, msg_queue
, that supports multiple consumers.
Dim q as OraAQ Dim qMsg as OraAQMsg Dim agent as OraAQAgent Set q = OraDatabase.CreateAQ("msg_queue") Set qMsg = q.AQMsg(1,"MESSAGE_TYPE") 'To add SCOTT as a recipient for the message, Set agent = qMsg.AQAgent("SCOTT") 'To enqueue, q.Enqueue
See Also:
Oracle Streams Advanced Queuing User's Guide for a detailed description of Oracle Advanced Queuing