etcdmq

Crates.ioetcdmq
lib.rsetcdmq
version0.0.3
sourcesrc
created_at2022-06-14 18:17:23.898357
updated_at2022-06-14 18:17:23.898357
descriptionLightweight Message Queue backed by etcd
homepagehttps://rust.volf.co/etcdmq
repositoryhttps://github.com/volfco/etcdmq
max_upload_size
id606022
size55,584
Colum (volfco)

documentation

README

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
Commit count: 4

cargo fmt