MongoDB Driver Support
The queue extension sounds awesome, but it lacks MongoDB driver support. I believe changes would be needed in the below mentioned lines and around the whole mutex concept.
I would be really happy to see MongoDB driver support in the official Queue extension. Thanks in advance.
https://github.com/yiisoft/yii2-queue/blob/98ea96a4b0c66453cfbe385b91126fc271cef892/src/drivers/db/Queue.php#L32-L43 https://github.com/yiisoft/yii2-queue/blob/98ea96a4b0c66453cfbe385b91126fc271cef892/src/drivers/db/Queue.php#L58-L67 https://github.com/yiisoft/yii2-queue/blob/98ea96a4b0c66453cfbe385b91126fc271cef892/src/drivers/db/Queue.php#L167-L168
I think using queues with MongoDB is a strange solution. Why do you want to use MongoDB for queues? Perhaps you should consider using, for example, ZeroMQ if more 'standard' queues don't suit your needs?
Hi @s1lver, our projects use mongodb as the backing DB. We don't want to add any other dependencies. Also, we don't want to use file driver because we might have multiple instances connecting to the same DB in some HA situations.
Asking for the sake of understanding. Why would you say MongoDB is a strange solution and non-standard queue? Based on my research, MongoDB doesn't need an external Mutex.
Could you make a PR with your implementation? It would be great if you could branch off from the 3.0 branch, which has minimal PHP 8.1 support.