taoensso / carmine

Redis client + message queue for Clojure
https://www.taoensso.com/carmine
Eclipse Public License 1.0
1.15k stars 130 forks source link

Publishing a Keyword results in a String being received #167

Closed expez closed 8 years ago

expez commented 8 years ago

I'm on redis 3.0.6 and on carmine version 2.12.2.

(def listener (car/with-new-pubsub-listener redis
                {"*" println}
                (car/psubscribe "*")))

;;=> [psubscribe * 1]
;;=> #<Var@1344891d: {...}>

(car/publish redis "chn" :keyword)
;;=> [pmessage * chn keyword]
;;=> 1

(car/wcar redis (car/publish "chn" {:keyword 1}))
;;=> [pmessage * chn {:keyword 1}]
;;=> 1

Is this a bug, or do keywords only work when they're part of some data structure like the map above?

ptaoussanis commented 8 years ago

Hi there, please see https://github.com/ptaoussanis/carmine#serialization

expez commented 8 years ago

Thanks. I misread the docs to mean that keywords were (de)serialized transparently for v2+.

ptaoussanis commented 8 years ago

No problem, good luck!