Skip to content

Latest commit

 

History

History
executable file
·
17 lines (13 loc) · 554 Bytes

README.md

File metadata and controls

executable file
·
17 lines (13 loc) · 554 Bytes

etcdmq

A simple message queue on top of etcd

two inputs- watcher, and lister. watcher subscribes to events in the key space, and adds key ID into the queue lister lists all keys in the key space, and adds each item to the queue

  • the queue is read in a loop. a job id is selected
  • client starts a transaction
  • checks if key exists
  • if it does, delete key
  • if it does not, list keys, and try a random key
  • read job data from /job
  • return Task object
    • on drop, Task moves the task state from TaskState::CONSUMED to TaskState::COMPLETED