Brightspot CMS Developer Guide

Queue processing

Dari includes the following classes for implementing queue processing background tasks that run asynchronously.

  • AsyncQueue represents an asynchronous queue.
  • AsyncProducer creates data and puts it (produces) into an output queue. A subclass must implement the produce method.
  • AsyncConsumer reads from an input queue and processes (consumes) the data. For example, a consumer can transform the data and save it to a database or put it in another queue. A subclass must implement the consume method.
  • AsyncProcessor does both: it consumes all items from an input queue, processes them, and produces new items into an output queue. A subclass must implement the process method.
Queue processing.png

Dari provides queue processing database support that is implemented from the above collection of classes. You can also implement these classes to create queue pipelines.

Previous Topic
Recalculation tasks
Next Topic
Queue pipeline example
Was this topic helpful?
Thanks for your feedback.