ODAC

TOraQueue.Listen Method

Listens to one or more queues on behalf of the list of agents.

Class

TOraQueue

Syntax

procedure Listen(Agents: TQueueAgents; Agent: TQueueAgent; WaitTimeout: integer = AQ_FOREVER); overload;

Parameters
Agents
Holds the list of the agents.
Agent
Holds the agent name when monitoring multiconsumer queues.
WaitTimeout
Holds the amount of time to wait if there are no messages found.

Remarks

Call the Listen method to listen to one or more queues on behalf of the list of agents. You specify the queue to be monitored in the address field of each agent listed. You must also specify the name of the agent when monitoring multiconsumer queues. For single-consumer queues, an agent name must not be specified. Only local queues are supported as addresses.

This is a blocking call that returns when there is a message ready for consumption for an agent in the list. If there are messages for more than one agent, only the first agent listed is returned. If there are no messages found when the wait time expires, an error is raised.

A successful return from the LISTEN call is only an indication that there is a message for one of the listed agents in one of the specified queues. The interested agent must still dequeue the relevant message.

Second overload with DeliveryMode is supported starting with Oracle 10. DeliveryMode possible values are described in TDequeueOptions.DeliveryMode topic.

See Also

© 1997-2024 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback