🎉 Add version 4 of blob encoding.

The version 4 starts using the hight performance fressian
binary encoding with very lightweight compression layer.
This commit is contained in:
Andrey Antukh 2021-12-21 15:25:21 +01:00 committed by Alonso Torres
parent a9904c6ada
commit 219f9c478d
12 changed files with 338 additions and 24 deletions

View file

@ -179,18 +179,18 @@
;; Add a unique listener to connection
(.addListener sub-conn
(reify RedisPubSubListener
(message [it pattern topic message])
(message [it topic message]
(message [_it _pattern _topic _message])
(message [_it topic message]
;; There are no back pressure, so we use a sliding
;; buffer for cases when the pubsub broker sends
;; more messages that we can process.
(let [val {:topic topic :message (blob/decode message)}]
(when-not (a/offer! rcv-ch val)
(l/warn :msg "dropping message on subscription loop"))))
(psubscribed [it pattern count])
(punsubscribed [it pattern count])
(subscribed [it topic count])
(unsubscribed [it topic count])))
(psubscribed [_it _pattern _count])
(punsubscribed [_it _pattern _count])
(subscribed [_it _topic _count])
(unsubscribed [_it _topic _count])))
(letfn [(subscribe-to-single-topic [nsubs topic chan]
(let [nsubs (if (nil? nsubs) #{chan} (conj nsubs chan))]