Liking cljdoc? Tell your friends :D


an async clojure NATS client, wrapping jnats

creates Manifold streams on a NATS subject for :

  • publish only (a sink-only stream)
  • subscribe only (a source-only stream)
  • pubsub (a source+sink stream)


(require '[clj-nats-async.core :as nats])

(def n (nats/create-nats "nats://localhost:4222"))

(def s (nats/pubsub n "foo"))

(! s "boo")

(def msg (! s))
(nats/msg-body @msg) ;; => "boo"

(.close s)


Copyright 2016 Employee Republic Limited

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close