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.

images\simple.svg

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.

images\step1.svg
Worker 1 dequeues an item
images\step2.svg
Worker 2 dequeues an item
images\step3.svg
Worker 1 Completes handling of item
images\step4.svg
Worker 2 Completes handling of item
images\step5.svg
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.

images\step1.svg
Worker 1 dequeues an item
images\step2b.svg
Worker 1 reschedules the item
images\step3b.svg
Item is back in the queue