Oracle® Data Provider for .NET Developer's Guide 11g Release 2 (11.2.0.3) Part Number E23174-02 |
|
|
PDF · Mobi · ePub |
An OracleAQDequeueOptions
object represents the options available when dequeuing a message from an OracleAQQueue
object.
System.Object
OracleAQDequeueOptions
// C# public sealed class OracleAQDequeueOptions : ICloneable
All public static methods are thread-safe, although instance methods do not guarantee thread safety.
Namespace: Oracle.DataAccess.Client
Assembly: Oracle.DataAccess.dll
ODP.NET Version: ODP.NET for .NET Framework 2.0 or ODP.NET for .NET Framework 4
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.
// 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.
// C# public string ConsumerName {get;set;}
A string
.
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.
// C# public string Correlation {get;set;}
A string
.
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.
// C# public OracleAQMessageDeliveryMode DeliveryMode {get;set;}
An OracleAQMessageDeliveryMode
enumerated value.
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.
// C# public OracleAQDequeueMode DequeueMode {get;set;}
An OracleAQDequeueMode
enumerated value.
ArgumentOutOfRangeException
- The specified DequeueMode
value is invalid.
The default value is OracleAQDequeueMode.Remove
.
See Also:
This instance property specifies the message identifier of the message to be dequeued.
// C# public byte[] MessageId {get;set;}
A byte[ ].
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.
// C# public OracleAQNavigationMode NavigationMode {get;set;}
An OracleAQNavigationMode
enumerated value.
ArgumentOutOfRangeException
- The specified NavigationMode
value is invalid.
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.
// C# public bool ProviderSpecificType {get;set;}
A bool.
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.
// C# public OracleAQVisibilityMode Visibility {get;set;}
An OracleAQVisibilityMode
enumerated value.
ArgumentOutOfRangeException
- The Visibility
value specified is invalid.
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.
// C# public int Wait {get;set;}
Any positive integer
value or 0 or -1.
ArgumentOutOfRangeException
- The specified Wait
value is invalid.
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.
// C# public object Clone();
An OracleAQDequeueOptions
object.
ICloneable
.
The cloned object has the same property values as the object being cloned.