Hi everyone,

I'm pleased to announce the first proper release of carmine-streams 
<https://github.com/oliyh/carmine-streams>, a library for working with 
Redis streams in Clojure using carmine.

Redis does a brilliant job of being fast with loads of features and Carmine 
does a brilliant job of exposing all the low-level Redis commands in 
Clojure. Working with Redis' streams API requires quite a lot of 
interaction to produce desirable high-level behaviour, and that is what 
this library provides.


carmine-streams allows you to create streams and consumer groups, consume 
streams reliably, deal with failed consumers and unprocessable messages and 
gain visibility on the state of it all with a few simple functions.

For example, consuming a stream via a consumer group is as simple as this:

(require '[carmine-streams.core :as cs])
(def conn-opts {})

(def stream (cs/stream-name "sensor-readings"))        ;; -> 
stream/sensor-readings
(def group (cs/group-name "persist-readings"))         ;; -> 
group/persist-readings
(def consumer (cs/consumer-name "persist-readings" 0)) ;; -> 
consumer/persist-readings/0

(cs/create-consumer-group! conn-opts stream group)

(def opts {:block 5000})

(future
 (cs/start-consumer! conn-opts
                     stream
                     group
                     consumer
                     #(println "Yum yum, tasty message" %)
                     opts))


More details are in the readme. It's available now on Clojars.

Thanks and enjoy,
Oliy

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/16d62973-e02f-448d-a633-d5e4348818ba%40googlegroups.com.

Reply via email to