Skip Headers
Oracle® Data Provider for .NET Developer's Guide
12c Release 1 (12.1.0.1.0)

Part Number E41125-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

OracleAQDequeueOptions Class

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

Requirements

Provider ODP.NET, Unmanaged Driver
Assembly Oracle.DataAccess.dll
Namespace Oracle.DataAccess.Client
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5

Thread Safety

All public static methods are thread-safe, although instance methods do not guarantee thread safety.


OracleAQDequeueOptions Members

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

OracleAQDequeueOptions Constructor

Instantiates a new instance of the OracleAQDequeueOptions class


OracleAQDequeueOptions Properties

OracleAQDequeueOptions properties are listed in Table 12-5.

Table 12-5 OracleAQDequeueOptions Properties

Property Description

ConsumerName

Specifies the consumer name for which to dequeue the message

Correlation

Specifies the correlation identifier of the message to be dequeued

DeliveryMode

Specifies the expected delivery mode of the message being dequeued

DequeueMode

Specifies the locking behavior associated with the dequeue operation

MessageId

Specifies the message identifier of the message to be dequeued

NavigationMode

Specifies the position of the message that will be retrieved

ProviderSpecificType

Specifies whether the payload of a dequeued message is provided as an ODP.NET specific type or a .NET type

Visibility

Specifies whether or not the new message is dequeued as part of the current transaction

Wait

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

Clone

Creates a copy of an OracleAQDequeueOptions object.



OracleAQDequeueOptions Constructor

The OracleAQDequeueOptions constructor creates an instance of the OracleAQDequeueOptions class and sets all its properties to their default values.

Declaration

// C#
public OracleAQDequeueOptions();

OracleAQDequeueOptions Properties

OracleAQDequeueOptions properties are listed in Table 12-7.

Table 12-7 OracleAQDequeueOptions Properties

Property Description

ConsumerName

Specifies the consumer name for which to dequeue the message

Correlation

Specifies the correlation identifier of the message to be dequeued

DeliveryMode

Specifies the expected delivery mode of the message being dequeued

DequeueMode

Specifies the locking behavior associated with the dequeue operation

MessageId

Specifies the message identifier of the message to be dequeued

NavigationMode

Specifies the position of the message that will be retrieved

ProviderSpecificType

Specifies whether the payload of a dequeued message is provided as an ODP.NET specific type or a .NET type

Visibility

Specifies whether or not the new message is dequeued as part of the current transaction

Wait

Specifies the wait time, in seconds, for a message that matches the search criteria


ConsumerName

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.

Correlation

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.

DeliveryMode

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.

DequeueMode

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.

MessageId

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.

NavigationMode

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.

ProviderSpecificType

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.

Visibility

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.

Wait

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.


OracleAQDequeueOptions Public Methods

The OracleAQDequeueOptions public method is listed in Table 12-8.

Table 12-8 OracleAQDequeueOptions Public Methods

Public Method Description

Clone

Creates a copy of an OracleAQDequeueOptions object


Clone

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.