Closed zcaudate closed 4 years ago
Hi Chris!
Sure, this is possible- see here for details. In Carmine you can use the corresponding pub/sub API.
Best of luck!
Hi Peter
I was playing around with:
(def listener
(car/with-new-pubsub-listener (:spec (:conn -c-))
{"*" (fn [msg] (println "Print " msg))}
(car/psubscribe "*")))
I couldn't figure out why messages were not printing. That link you sent explaining the configuration options really helped.
Adding this fixed it:
(car/wcar (:conn -c-)
(car/config-set "notify-keyspace-events" "KEA"))
Thanks.
Is there a way to listen for changes on a given key so that every time
(car/set <key> value)
is run, a watch function runs - like that of an atom?Can this be implemented with pub/sub?