The same objects are getting dequeued from the CouchbaseQueue multiple times. The expectation is that the item gets removed from the queue before it can be accessed in a subsequent request. Instead, the same items are being retrieved from the queue more than 200 times over the course of 15 minutes. Also, in my single node test environment, this issue doesn’t exist. This leads me to believe that the CouchbaseQeueue does not work with replication.
My application has several clients. It uses a CouchbaseQueue to store “jobs”. Couchbase is clustered with 3 nodes. The queue may have over 5,000 objects in it at a time. Using 2.7.16 of the .Net SDK.
Is there a way to enforce durability for a CouchbaseQueue? Is there anything that can be done at the query level or the server level to speed up replication, so that quick succession queuing and dequeuing is reliable?
public QueueClient(string bucketName, string queueName)
{
CouchbaseConfig.Register(bucketName);
_bucket = ClusterHelper.GetBucket(bucketName);
_couchbaseQueue = new CouchbaseQueue<QueueMessage>(_bucket, queueName);
}
public QueueMessage Dequeue()
{
return _couchbaseQueue.Dequeue();
}