diff --git a/core/lib/Drupal/Core/Queue/DatabaseQueue.php b/core/lib/Drupal/Core/Queue/DatabaseQueue.php
index 7048591..ad1702f 100644
--- a/core/lib/Drupal/Core/Queue/DatabaseQueue.php
+++ b/core/lib/Drupal/Core/Queue/DatabaseQueue.php
@@ -44,11 +44,12 @@ function __construct($name, Connection $connection) {
   /**
    * Implements Drupal\Core\Queue\QueueInterface::createItem().
    */
-  public function createItem($data) {
+  public function createItem($data, $priority = 0) {
     $query = $this->connection->insert('queue')
       ->fields(array(
         'name' => $this->name,
         'data' => serialize($data),
+        'priority' => $priority,
         // We cannot rely on REQUEST_TIME because many items might be created
         // by a single request which takes longer than 1 second.
         'created' => time(),
@@ -72,7 +73,7 @@ public function claimItem($lease_time = 30) {
     // until an item is successfully claimed or we are reasonably sure there
     // are no unclaimed items left.
     while (TRUE) {
-      $item = $this->connection->queryRange('SELECT data, item_id FROM {queue} q WHERE expire = 0 AND name = :name ORDER BY created ASC', 0, 1, array(':name' => $this->name))->fetchObject();
+      $item = $this->connection->queryRange('SELECT data, item_id FROM {queue} q WHERE expire = 0 AND name = :name ORDER BY priority ASC, created ASC', 0, 1, array(':name' => $this->name))->fetchObject();
       if ($item) {
         // Try to update the item. Only one thread can succeed in UPDATEing the
         // same row. We cannot rely on REQUEST_TIME because items might be
diff --git a/core/lib/Drupal/Core/Queue/Memory.php b/core/lib/Drupal/Core/Queue/Memory.php
index 95abddd..c62abcd 100644
--- a/core/lib/Drupal/Core/Queue/Memory.php
+++ b/core/lib/Drupal/Core/Queue/Memory.php
@@ -45,10 +45,11 @@ public function __construct($name) {
   /**
    * Implements Drupal\Core\Queue\QueueInterface::createItem().
    */
-  public function createItem($data) {
+  public function createItem($data, $priority = 0) {
     $item = new stdClass();
     $item->item_id = $this->idSequence++;
     $item->data = $data;
+    $item->priority = $priority;
     $item->created = time();
     $item->expire = 0;
     $this->queue[$item->item_id] = $item;
diff --git a/core/lib/Drupal/Core/Queue/QueueInterface.php b/core/lib/Drupal/Core/Queue/QueueInterface.php
index 8e7e22c..49230b8 100644
--- a/core/lib/Drupal/Core/Queue/QueueInterface.php
+++ b/core/lib/Drupal/Core/Queue/QueueInterface.php
@@ -21,13 +21,16 @@
    * @param $data
    *   Arbitrary data to be associated with the new task in the queue.
    *
+   * @param $priority
+   *   Priority to be associated with the new task in the queue.
+   *
    * @return
    *   TRUE if the item was successfully created and was (best effort) added
    *   to the queue, otherwise FALSE. We don't guarantee the item was
    *   committed to disk etc, but as far as we know, the item is now in the
    *   queue.
    */
-  public function createItem($data);
+  public function createItem($data, $priority = 0);
 
   /**
    * Retrieves the number of items in the queue.
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index cfc9a4e..ddf6345 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -993,6 +993,12 @@ function system_schema() {
         'default' => 0,
         'description' => 'Timestamp when the claim lease expires on the item.',
       ),
+      'priority' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        'default' => 0,
+        'description' => 'The priority of the item.',
+      ),
       'created' => array(
         'type' => 'int',
         'not null' => TRUE,
@@ -2095,6 +2101,22 @@ function system_update_8048() {
 }
 
 /**
+ * Add priority column to queue table.
+ */
+function system_update_8049() {
+  // Add the {queue}.priority column if it doesn't exist.
+  if (!db_field_exists('queue', 'priority')) {
+    $column = array(
+      'type' => 'int',
+      'not null' => TRUE,
+      'default' => 0,
+      'description' => 'The priority of the item.',
+    );
+    db_add_field('queue', 'priority', $column);
+  }
+}
+
+/**
  * @} End of "defgroup updates-7.x-to-8.x".
  * The next series of updates should start at 9000.
  */
