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

Namespace:  BerkeleyDB
Assembly:  libdb_dotnet181 (in libdb_dotnet181.dll) Version: 18.1.32.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 records to 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 increases contention and reduces concurrency when there are many reading threads.

See Also