Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Queue Unique

Security covered Maintenance fixes only 2,518 sites

This module provides a queue that only accepts unique items. If you attempt to add an item that already exists in the queue, it will be ignored.

Did you ever want a queue that only accepts unique items? This module provides a way of doing that. If you try to insert a duplicated item in the queue, the item is ignored.

// $data can be anything.
$data = ['Lorem', 'ipsum'];

$queue_name = 'your_queue_name';
$queue = \Drupal::service('queue')->get($queue_name);
$queue->createItem($data);
// This will insert a duplicate, and will return FALSE.
if ($queue->createItem($data) === FALSE) {
  // The item was a duplicate, respond appropriately.
}

Usage

In order for your queue to use the Queue Unique you need to update your settings.php file:

$settings['queue_service_your_queue_name'] = 'queue_unique.database';
Drupal 10–11

Ask your assistant about Queue Unique

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

1 tracked project depends on this one

Activity

Tracked releases
4
Tracked since
Feb 2023
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Slowing

Release Timeline

Releases

Version Type Core PHP Release date
4.0.0 Stable 10–11 Apr 18, 2025
4.x-dev Dev 10–11 Apr 18, 2025
3.0.2 Stable 8–10 May 31, 2023
3.0.1 Stable 8–9 Feb 14, 2023