../E17727-04.epub /> ../E17727-04.mobi />

OraAQAgent Object

Description

The OraAQAgent object represents a message recipient and is only valid for queues that allow multiple consumers.

Remarks

An OraAQAgent object can be instantiated by invoking the AQAgent method. For example:

Set agent = qMsg.AQAgent(name)

Methods

None.

Example

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: