This repository has been archived by the owner on Feb 1, 2022. It is now read-only.
Use reliable queues by Redis to process incoming orders #4
Labels
enhancement
New feature or request
By using
RPOPLPUSH
we can guarantee that the order will be processed exactly once:PSUBSCRIBE
) onCONSUMER
queue keyspace notificationsLPUSH
keyevent is firedCONSUMER
queue and atomically pushes to theCONSUMER_PROCESSING
queue (RPOPLPUSH
)processing
LREM
) the element from theCONSUMER_PROCESSING
queueEdge cases:
processing
status from the datastore and removes already saved orders from the consumer queue, after cleanup of consumer queue it proceeds operation as normalThe text was updated successfully, but these errors were encountered: