A5Queueing Namespace

Description

Classes that support queueing services like AWS SQS, Azure StorageQueues and RabbitMQ.

Queue Services implement a simple pattern where Client processes can enqueue items to be processed by a worker.

Queues are first in - first out, so the item that has been in the queue the longest gets dequeued first.

 API

Name
Description
A5queueing::Manager Class

Class to manage queues, which includes listing the existing queues by name, creating new queues, and deleting existing queues.

a5queueing::queue Class

Class representing Queue, allows Enqueue and Dequeue of Queue Items.

A5Queueing::QueueItem Class

Item that is Enqueued or Dequeued from a Queue object.

 Robust Queues with Many Workers

Dequeueing moves items to an timeout list, where they will stay until the Worker tells the queue that the item completed, or the Worker requests that the item be rescheduled, or the timeout was hit.

This ensures that items don't get lost if for some reason the Worker process stops before the item is processed.

Worker 1 dequeues an item
Worker 2 dequeues an item
Worker 1 Completes handling of item
Worker 2 Completes handling of item
Worker 1 dequeues next item...

 Rescheduling Items

Rescheduling items occurs automatically if the Worker doesn't handle the item in the allotted time, But Items can be rescheduled explicitly as well.

Worker 1 dequeues an item
Worker 1 reschedules the item
Item is back in the queue