When to use Queueable Apex
There are three primary use cases for Queueable Apex, which we will discuss in this section, however, you may notice that some of them overlap with use cases we previously discussed for future methods and Batch Apex. This is because there is typically no one right answer for how you should look to architect and develop a solution—although there are often many wrong ways of doing things. When working on some of these overlapping use cases, the key question to consider is whether you wish to chain the asynchronous process you are building. If the answer is yes, then you are almost always going to get the best results using a Queueable Apex implementation. Let's now look at some common use cases in the following sections.
Extensive or complex processes
The first key use case is for extensive or complex database processes. What do I mean by this? As we know, Salesforce has a series of governor limits that are in place to ensure that resources...