Activity Forums Salesforce® Discussions What Is The Difference Between Queues And Apex Flex Queues?

  • What Is The Difference Between Queues And Apex Flex Queues?

    Posted by Shuvam on June 6, 2023 at 11:58 am

    Queues and Apex Flex Queues in Salesforce are related to how asynchronous Apex jobs are handled, but they serve different functions:

    1. Queues: In Salesforce, queues help in managing the sharing of workload. Queues are typically used to distribute cases, leads, or other objects to a group of users who can then take ownership of the records in the queue. It provides a flexible way to assign work to a group of users who can pick the records from the queue based on their workload and availability. This doesn't relate directly to Apex job execution.
    2. Apex Flex Queues: Apex Flex Queue allows you to submit up to 100 batch jobs for execution. Any jobs that are submitted for execution are in holding status and are placed into the Apex Flex Queue. Up to 100 batch jobs can be in the holding status. When system resources become available, the system picks up the next job from the top of the Apex Flex Queue and moves it to the batch job queue. The order of jobs in the Apex Flex Queue is based on when they're submitted—the first job that was submitted is the first to be executed.

    So, Queues are used to manage workload among users, whereas Apex Flex Queues are used to manage the execution of asynchronous Apex jobs.

    Shuvam replied 1 year, 5 months ago 1 Member · 0 Replies
  • 0 Replies

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Popular Salesforce Infographics