Commit message (Collapse) | Author | Age | |
---|---|---|---|
* | Issue #2356983 by bzrudi71, Dave Reid, jaredsmith: SystemQueue::claimItem() ↵ | David Rothstein | 2015-05-04 |
| | | | | sometimes returns items in the wrong order (resolves locale test failures on PostgreSQL) | ||
* | Issue #1813966 by Sylvain Lecoy: Remove __construct() from interfaces ↵ | David Rothstein | 2013-08-05 |
| | | | | definition. | ||
* | Issue #1405260 by skottler: Clarify the language around non-reliable queue ↵ | webchick | 2012-01-30 |
| | | | | examples. | ||
* | Stripping CVS keywords | The Great Git Migration | 2011-02-25 |
| | |||
* | #987384 follow-up by h_peter, jhodgdon: Further clean-ups to group topics. | Angie Byron | 2011-01-03 |
| | |||
* | - Patch #782616 by chx, dww: provide an ACID queue API entrypoint. | Dries Buytaert | 2010-06-14 |
| | |||
* | - Patch #781876 by mr.baileys: Drupal not Drapal. | Dries Buytaert | 2010-04-26 |
| | |||
* | #758916 by chx and Damien Tournoud: Fixed Default queue implementation is ↵ | Angie Byron | 2010-04-03 |
| | | | | hardwired. | ||
* | #629794 follow-up by yched: Fixed batch API in update.php. | Angie Byron | 2010-01-09 |
| | |||
* | #629794 by yched: Fix Scaling issues with batch API. (with tests) | Angie Byron | 2010-01-08 |
| | |||
* | - Patch #659710 by fgm: queue API was missing a releaseItem method. | Dries Buytaert | 2009-12-16 |
| | |||
* | - Patch #602306 by alex_b: removed some unused code. | Dries Buytaert | 2009-10-31 |
| | |||
* | - Patch #602306 by David Strauss, Damien Tournoud: Fixed bug in the default ↵ | Dries Buytaert | 2009-10-14 |
| | | | | queue implementation. | ||
* | - Patch #602306 by chx: simplify the default queue implementation. | Dries Buytaert | 2009-10-12 |
| | |||
* | - Patch #391340 by dww: documentation clean-up and correction. | Dries Buytaert | 2009-10-10 |
| | |||
* | #564394 by Berdir and Crell: Removed database BC layer. nah nah nah nah... ↵ | Angie Byron | 2009-09-18 |
| | | | | hey hey hey... gooood byeeee... | ||
* | - Patch #471070 by stella: millions of code style fixes. | Dries Buytaert | 2009-05-24 |
| | |||
* | - Patch #391340 by chx, dww, neclimdul, Crell, alex_b, et al: job queue API. | Dries Buytaert | 2009-05-06 |
The queue system allows placing items in a queue and processing them later. The system tries to ensure that only one consumer can process an item. Before a queue can be used it needs to be created by DrupalQueueInterface::createQueue(). Items can be added to the queue by passing an arbitrary data object to DrupalQueueInterface::createItem(). To process an item, call DrupalQueueInterface::claimItem() and specify how long you want to have a lease for working on that item. When finished processing, the item needs to be deleted by calling DrupalQueueInterface::deleteItem(). If the consumer dies, the item will be made available again by the DrapalQueueInterface implementation once the lease expires. Another consumer will then be able to receive it when calling DrupalQueueInterface::claimItem(). The $item object used by the DrupalQueueInterface can contain arbitrary metadata depending on the implementation. Systems using the interface should only rely on the data property which will contain the information passed to DrupalQueueInterface::createItem(). The full queue item returned by DrupalQueueInterface::createItem() needs to be passed to DrupalQueueInterface::deleteItem() once processing is completed. While the queue system makes a best effort to preserve order in messages, due to the pluggable nature of the queue, there is no guarantee that items will be delivered on claim in the order they were sent. For example, some implementations like beanstalkd or others with distributed back-ends like Amazon SQS will be managing jobs for a large set of producers and consumers where a strict FIFO ordering will likely not be preserved. The system also makes no guarantees about a task only being executed once: callers that have non-idempotent tasks either need to live with the possiblity of the task being invoked multiple times in cases where a claim lease expires, or need to implement their own transactions to make their tasks idempotent. |