DequeueArray(int, OracleAQDequeueOptions)
This instance method dequeues multiple messages from a queue using the supplied dequeue options.
Note:
JSON payloads are not supported.
Declaration
// C# public OracleAQMessage[] DequeueArray(int dequeueCount, OracleAQDequeueOptions dequeueOptions);
Parameters
-
dequeueCount
An
integer
specifying the numbers of messages to dequeue. -
dequeueOptions
An
OracleAQDequeueOptions
object.
Return Value
An array of OracleAQMessage
instances representing the dequeued messages.
Exceptions
ArgumentOutOfRangeException
- dequeueCount
is less than or equal to 0.
InvalidOperationException
- The connection is not open.
ObjectDisposedException
- The object is already disposed.
OracleException
- In case of timeout, an exception is thrown with the message, ORA-25228: timeout or end-of-fetch during message dequeue from queue_name.
Timeout may happen if DequeueOptions.Wait
is set to a value other than -1
.
Remarks
Calling this method does not change the DequeueOptions
property of the queue.
If the supplied dequeueOptions
object is null
, then the dequeue options default values are used. The DequeueOptions
property of the queue object is ignored in this operation.
The MessageType
property must be set appropriately before calling this function. If the MessageType
is OracleAQMessageType.UDT
, then the UdtTypeName
property must be set as well.
The size of the returned array may be less than the dequeueCount
. It dependes on the actual number of messages present in the queue.
Dequeued buffered messages always have null
MessageId
values irrespective of the database version.