Liking cljdoc? Tell your friends :D

nats.core


closeclj

(close conn)
source

connectclj

(connect uri & [{:keys [jet-stream-options key-value-options]}])

Connect to the NATS server. Optionally configure jet stream and key/value management, or use nats.stream/configure and nats.kv/configure respectively later.

Connect to the NATS server. Optionally configure jet stream and key/value
management, or use `nats.stream/configure` and `nats.kv/configure`
respectively later.
sourceraw docstring

default-tzclj

The Java SDK uses ZonedDateTime for every instant and defaults the time zone to GMT. All the NATS times are instants in time, so Instant is the appropriate representation for them - no need to wrap them all in a timezone. This default timezone is here only to convert incoming Instants to the ZonedDateTime the Java SDK expects.

The Java SDK uses ZonedDateTime for every instant and defaults the time zone to
GMT. All the NATS times are instants in time, so Instant is the appropriate
representation for them - no need to wrap them all in a timezone. This default
timezone is here only to convert incoming Instants to the ZonedDateTime the Java
SDK expects.
sourceraw docstring

publishclj

(publish conn message)

Publish a message. Performs no publish acking; do not use for publishing to a JetStream subject, instead use nats.stream/publish.

message is a map of:

  • :nats.message/subject - The subject to publish to
  • :nats.message/data - The message data. Can be any Clojure value
  • :nats.message/headers - An optional map of string keys to string (or collection of string) values to set as meta-data on the message.
  • :nats.message/reply-to - An optional reply-to subject.
Publish a message. Performs no publish acking; do not use for publishing to a
JetStream subject, instead use `nats.stream/publish`.

`message` is a map of:

- `:nats.message/subject` - The subject to publish to
- `:nats.message/data` - The message data. Can be any Clojure value
- `:nats.message/headers` - An optional map of string keys to string (or
collection of string) values to set as meta-data on the message.
- `:nats.message/reply-to` - An optional reply-to subject.
sourceraw docstring

pull-messageclj

(pull-message subscription timeout)
source

requestclj

(request conn message)

Make a request and wait for the response. Returns a future that resolves with the response.

message is a map of:

  • :nats.message/subject - The subject to publish to
  • :nats.message/data - The message data. Can be any Clojure value
  • :nats.message/headers - An optional map of string keys to string (or collection of string) values to set as meta-data on the message.

In request/response, :nats.message/reply-to is reserved for the server.

Make a request and wait for the response. Returns a future that resolves with
the response.

`message` is a map of:

- `:nats.message/subject` - The subject to publish to
- `:nats.message/data` - The message data. Can be any Clojure value
- `:nats.message/headers` - An optional map of string keys to string (or
collection of string) values to set as meta-data on the message.

In request/response, `:nats.message/reply-to` is reserved for the server.
sourceraw docstring

subscribeclj

(subscribe conn subject & [queue-name])

Subscribe to non-stream subject. For JetStream subjects, instead use nats.stream/subscribe. Pull messages with nats.core/pull-message.

Subscribe to non-stream subject. For JetStream subjects, instead use
`nats.stream/subscribe`. Pull messages with `nats.core/pull-message`.
sourceraw docstring

unsubscribeclj

(unsubscribe subscription)
source

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

× close