Oracle® Data Provider for .NET Developer's Guide 11g Release 2 (11.2) Part Number E12249-01 |
|
|
View PDF |
An OracleAQDequeueOptions
object represents the options available when dequeuing a message from an OracleAQQueue
object.
Class Inheritance
System.Object
OracleAQDequeueOptions
Declaration
// C# public sealed class OracleAQDequeueOptions : ICloneable
Thread Safety
All public static methods are thread-safe, although instance methods do not guarantee thread safety.
Requirements
Namespace: Oracle.DataAccess.Client
Assembly: Oracle.DataAccess.dll
Microsoft .NET Framework Version: 2.0 or later
See Also:
OracleAQDequeueOptions
members are listed in the following tables.
OracleAQDequeueOptions Constructor
The OracleAQDequeueOptions
constructor is listed in Table 12-4.
Table 12-4 OracleAQDequeueOptions Constructor
Constructor | Description |
---|---|
Instantiates a new instance of the |
OracleAQDequeueOptions Properties
OracleAQDequeueOptions
properties are listed in Table 12-5.
Table 12-5 OracleAQDequeueOptions Properties
Property | Description |
---|---|
Specifies the consumer name for which to dequeue the message |
|
Specifies the correlation identifier of the message to be dequeued |
|
Specifies the expected delivery mode of the message being dequeued |
|
Specifies the locking behavior associated with the dequeue operation |
|
Specifies the message identifier of the message to be dequeued |
|
Specifies the position of the message that will be retrieved |
|
Specifies whether the payload of a dequeued message is provided as an ODP.NET specific type or a .NET type |
|
Specifies whether or not the new message is dequeued as part of the current transaction |
|
Specifies the wait time, in seconds, for a message that matches the search criteria |
OracleAQDequeueOptions Public Methods
OracleAQDequeueOptions
public methods are listed in Table 12-6.
Table 12-6 OracleAQDequeueOptions Public Methods
Public Method | Description |
---|---|
Creates a copy of an |
The OracleAQDequeueOptions
constructor creates an instance of the OracleAQDequeueOptions
class and sets all its properties to their default values.
Declaration
// C# public OracleAQDequeueOptions();
See Also:
OracleAQDequeueOptions
properties are listed in Table 12-7.
Table 12-7 OracleAQDequeueOptions Properties
Property | Description |
---|---|
Specifies the consumer name for which to dequeue the message |
|
Specifies the correlation identifier of the message to be dequeued |
|
Specifies the expected delivery mode of the message being dequeued |
|
Specifies the locking behavior associated with the dequeue operation |
|
Specifies the message identifier of the message to be dequeued |
|
Specifies the position of the message that will be retrieved |
|
Specifies whether the payload of a dequeued message is provided as an ODP.NET specific type or a .NET type |
|
Specifies whether or not the new message is dequeued as part of the current transaction |
|
Specifies the wait time, in seconds, for a message that matches the search criteria |
See Also:
This instance property specifies the consumer name for which to dequeue the message.
Declaration
// C# public string ConsumerName {get;set;}
Property Value
A string
.
Remarks
The ConsumerName
property only accesses those messages that match the consumer name. If a queue is not set up for multiple consumers, then this field should be set to null
.
See Also:
This instance property specifies the correlation identifier of the message to be dequeued.
Declaration
// C# public string Correlation {get;set;}
Property Value
A string
.
Remarks
This property specifies the identification of the message to be dequeued. Special pattern matching characters, such as the percent sign (%
) and the underscore (_
) can be used. If more than one message satisfies the pattern, then the order of dequeuing is undetermined.
The maximum length of Correlation
is 128.
MessageId
and Correlation
are two independent identifiers. While MessageId
is unique for a message, a group of messages can be assigned the same Correlation
. Also, pattern matching is possible only with Correlation
.
See Also:
This instance property specifies the expected delivery mode of the message being dequeued.
Declaration
// C# public OracleAQMessageDeliveryMode DeliveryMode {get;set;}
Property Value
An OracleAQMessageDeliveryMode
enumerated value.
Remarks
This property specifies the type of messages to be dequeued. It can be set to dequeue either persistent or buffered messages, or both from a queue. The following values are valid:
OracleAQMessageDeliveryMode.Persistent
OracleAQMessageDeliveryMode.Buffered
OracleAQMessageDeliveryMode.PersistentOrBuffered
The default value is OracleAQMessageDeliveryMode.Persistent
.
Buffered messaging is supported in all queue tables created with a database compatibility level of 8.1 or higher.
See Also:
This instance property specifies the locking behavior associated with the dequeue operation.
Declaration
// C# public OracleAQDequeueMode DequeueMode {get;set;}
Property Value
An OracleAQDequeueMode
enumerated value.
Exceptions
ArgumentOutOfRangeException
- The specified DequeueMode
value is invalid.
Remarks
The default value is OracleAQDequeueMode.Remove
.
See Also:
This instance property specifies the message identifier of the message to be dequeued.
Declaration
// C# public byte[] MessageId {get;set;}
Property Value
A byte[ ].
Remarks
The dequeue operation succeeds only if the message ID of the message being dequeued matches with the message ID specified.
See Also:
This instance property specifies the position of the message that will be retrieved.
Declaration
// C# public OracleAQNavigationMode NavigationMode {get;set;}
Property Value
An OracleAQNavigationMode
enumerated value.
Exceptions
ArgumentOutOfRangeException
- The specified NavigationMode
value is invalid.
Remarks
The default value is OracleAQNavigationMode.NextMessage
.
See Also:
This property specifies whether the payload of a dequeued message is provided as an ODP.NET specific type or a .NET type.
Declaration
// C# public bool ProviderSpecificType {get;set;}
Property Value
A bool.
Remarks
The default value of this property is false
. For a discussion of how this property affects payload type, refer to "MessageType" under the OracleAQQueue
class.
See Also:
This instance property specifies whether or not the new message is dequeued as part of the current transaction.
Declaration
// C# public OracleAQVisibilityMode Visibility {get;set;}
Property Value
An OracleAQVisibilityMode
enumerated value.
Exceptions
ArgumentOutOfRangeException
- The Visibility
value specified is invalid.
Remarks
The default value is OracleAQVisibilityMode.OnCommit
. You must use transactions when using the default value for this property. This ensures that applications do not lose messages and the messages are appropriately removed from the queue after the dequeue operation is successful. If transactions are not used when using the default visibility mode of OracleAQVisibilityMode.OnCommit
, then messages are not removed from the queue.
Using the alternative visibility mode value, OracleAQVisibilityMode.Immediate
can eliminate the need to create, commit, and rollback a transaction. However, if an error occurs during the dequeue operation, then the message may be lost.
The visibility parameter is ignored when DequeueMode
is set to OracleAQDequeueMode.Browse
.
See Also:
This instance property specifies the wait time, in seconds, for a message that matches the search criteria.
Declaration
// C# public int Wait {get;set;}
Property Value
Any positive integer
value or 0 or -1.
Exceptions
ArgumentOutOfRangeException
- The specified Wait
value is invalid.
Remarks
The default value is -1, which implies an infinite wait. The following values are valid:
Positive integer: Wait time in seconds.
-1
: Wait forever.
0
: Do not wait.
A value of less than -1 raises an ArgumentOutOfRangeException
.
This parameter is ignored if messages in the same group are being dequeued.
See Also:
The OracleAQDequeueOptions
public method is listed in Table 12-8.
Table 12-8 OracleAQDequeueOptions Public Methods
Public Method | Description |
---|---|
Creates a copy of an |
See Also:
This method creates a copy of an OracleAQDequeueOptions
object.
Declaration
// C# public object Clone();
Return Value
An OracleAQDequeueOptions
object.
Implements
ICloneable
.
Remarks
The cloned object has the same property values as the object being cloned.