<p>&quot;How does X work?&quot; is a very broad question, and not one I intend to try and answer in detail here. Below are a few resources that should help get you started:</p>
<p><a href="https://nystudio107.com/blog/robust-queue-job-handling-in-craft-cms" rel="nofollow noreferrer">Robust queue job handling in Craft CMS</a></p>
<p><a href="https://craftcms.stackexchange.com/questions/31159/how-to-best-design-large-queue-jobs">How to best design large queue jobs?</a></p>
<p>Also, here are all questions tagged with <code>queue</code>:<br />
<a href="https://craftcms.stackexchange.com/questions/tagged/queue">https://craftcms.stackexchange.com/questions/tagged/queue</a></p>
<p>Hope that helps!!</p>

CC BY-SA 4.0
2021-02-04T12:21:03.590Z
Thanks for the links. I could have been clearer in the original question, I was primarily interested in how the execution of the queue works (by default), and what native parts of Craft actually uses the queue. I wanted to assess which part of my installation is affected by changes to the queue execution (by SQS, or separate worker, for instance)
jishi
CC BY-SA 4.0
2021-02-03T19:23:31.297Z
2021-02-03T19:23:31.297Z
Ben Croker
<p>I'm trying to find documentation on how the queue system works, and what parts of craft relies on it. To my current understanding, the queue is normally executed when users are logged in to admin, and search indexes are updated via queue?</p>
<p>Also, I use webhooks, which seems to be executed the same way.</p>
<p>Publishing pending posts though, doesn't seem to use the queue?</p>
<p>I don't have any <code>queue/listen</code> task running, but since I'm running a dockerized version I could run a parallel container which just invokes <code>craft queue/listen</code> if needed, would that be favorable, and then I would disable the <code>runQueueAutomatically</code> setting I assume?</p>
<p>Since I'm also running this in AWS, I have the option to run the queue via SQS, what would be the benefits of that? I assume the default queue is just stored in the database, but I assume it is doing some sort of locking to prevent multiple executions, if I would have multiple queue daemons running. So only real benefit would then be, that the information isn't stored in database (thus, not part of backups for instance), because the load on the database seems abysmal for any normal scenario.</p>

<tasks><queue>
How does the queue work?
# How does the queue work?

(Asked by: username_0 on 2021-02-03)

I'm trying to find documentation on how the queue system works, and what parts of craft relies on it. To my current understanding, the queue is normally executed when users are logged in to admin, and search indexes are updated via queue?

Also, I use webhooks, which seems to be executed the same way.

Publishing pending posts though, doesn't seem to use the queue?

I don't have any `queue/listen` task running, but since I'm running a dockerized version I could run a parallel container which just invokes `craft queue/listen` if needed, would that be favorable, and then I would disable the `runQueueAutomatically` setting I assume?

Since I'm also running this in AWS, I have the option to run the queue via SQS, what would be the benefits of that? I assume the default queue is just stored in the database, but I assume it is doing some sort of locking to prevent multiple executions, if I would have multiple queue daemons running. So only real benefit would then be, that the information isn't stored in database (thus, not part of backups for instance), because the load on the database seems abysmal for any normal scenario.

**Tags:** tasks, queue


---

## 1 answers

### Answer by username_1 on 2021-02-03. Score: 2

"How does X work?" is a very broad question, and not one I intend to try and answer in detail here. Below are a few resources that should help get you started:

[Robust queue job handling in Craft CMS](https://nystudio107.com/blog/robust-queue-job-handling-in-craft-cms)

[How to best design large queue jobs?](https://craftcms.stackexchange.com/questions/31159/how-to-best-design-large-queue-jobs)

Also, here are all questions tagged with `queue`:  
<https://craftcms.stackexchange.com/questions/tagged/queue>

Hope that helps!!

> **Comments:**
> **username_0**: Thanks for the links. I could have been clearer in the original question, I was primarily interested in how the execution of the queue works (by default), and what native parts of Craft actually uses the queue. I wanted to assess which part of my installation is affected by changes to the queue execution (by SQS, or separate worker, for instance)  

---

