Skip to content
Beanstalkd Clojure client
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


A Clojure client library to the Beanstalkd queueing daemon.


; require twine
(require '[twine.client :as twine])

; producer puts jobs on a queue
(def twp (twine/init))
(twine/use twp "jobs")
(twine/put twp "hello worker")

; consumer works jobs off a queue
(def twc (twine/init))
(twine/watch twc "jobs")
(let [{:keys [id data]} (twine/reserve twc)]
  (println "reserved" id "with" data)
  (twine/delete twc id))

; observer checks stats
(def two (twine/init))
(twine/stats two)
(twine/stats-tube two "jobs")

The library implements all of the Beanstalkd commands; functions in this library are named after the commands.


Depend on [twine "0.0.1"] in your project.clj.

See also

The companion project Spine provides a higher-level enqueue / work interface that will be more appropriate for many applications.

Something went wrong with that request. Please try again.