Berkeley DB .NET API Documentation |
QueueDatabaseConfig..::.ConsumeInOrder Field |
QueueDatabaseConfig Class See Also |
Namespace:
BerkeleyDB
Assembly:
libdb_dotnet48 (in libdb_dotnet48.dll) Version: 4.8.24.0
Syntax
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.