Collapse All Expand All Code: All Code: Multiple Code: C# Code: Visual Basic Code: Visual C++

C#
Visual Basic
Visual C++

Berkeley DB .NET API Documentation
QueueDatabaseConfig..::.ConsumeInOrder Field
QueueDatabaseConfig Class See Also Send Feedback

If true, modify the operation of Consume(Boolean) to return key/data pairs in order. That is, they will always return the key/data item from the head of the queue.

Namespace: BerkeleyDB
Assembly: libdb_dotnet60 (in libdb_dotnet60.dll) Version: 6.0.20.0

# Syntax

C#
    public bool ConsumeInOrder

Visual Basic (Declaration)
    Public ConsumeInOrder As Boolean

Visual C++
    public:
    bool ConsumeInOrder

# Remarks

The default behavior of queue databases is optimized for multiple readers, and does not guarantee that record will be retrieved in the order they are added to the queue. Specifically, if a writing thread adds multiple records to an empty queue, reading threads may skip some of the initial records when the next Consume(Boolean) call returns.

This setting modifies Consume(Boolean) to verify that the record being returned is in fact the head of the queue. This will increase contention and reduce concurrency when there are many reading threads.

# See Also

QueueDatabaseConfig Class
BerkeleyDB Namespace