Liking cljdoc? Tell your friends :D

nats.stream


compression-optionsclj

Available compression options

  • :nats.compression-option/none
  • :nats.compression-option/s2
Available compression options

- `:nats.compression-option/none`
- `:nats.compression-option/s2`
sourceraw docstring

configureclj

(configure conn jet-stream-options)

Re-configure the JetStream management instance. Returns a new conn with the new configuration, does not change the original conn.

jet-stream-options is a map of:

  • :nats.stream/domain
  • :nats.stream/opt-out-290-consumer-create?
  • :nats.stream/prefix
  • :nats.stream/publish-no-ack?
  • :nats.stream/request-timeout
Re-configure the JetStream management instance. Returns a new `conn` with the
new configuration, does not change the original `conn`.

`jet-stream-options` is a map of:

- `:nats.stream/domain`
- `:nats.stream/opt-out-290-consumer-create?`
- `:nats.stream/prefix`
- `:nats.stream/publish-no-ack?`
- `:nats.stream/request-timeout`
sourceraw docstring

create-streamclj

(create-stream conn config)

Adds a stream. config is a map of the following keys:

  • :nats.stream/name
  • :nats.stream/description
  • :nats.stream/subjects
  • :nats.stream/retention-policy
  • :nats.stream/allow-direct?
  • :nats.stream/allow-rollup?
  • :nats.stream/deny-delete?
  • :nats.stream/deny-purge?
  • :nats.stream/max-age
  • :nats.stream/max-bytes
  • :nats.stream/max-consumers
  • :nats.stream/max-messages
  • :nats.stream/max-messages-per-subject
  • :nats.stream/max-msg-size
  • :nats.stream/replicas
Adds a stream. `config` is a map of the following keys:

- `:nats.stream/name`
- `:nats.stream/description`
- `:nats.stream/subjects`
- `:nats.stream/retention-policy`
- `:nats.stream/allow-direct?`
- `:nats.stream/allow-rollup?`
- `:nats.stream/deny-delete?`
- `:nats.stream/deny-purge?`
- `:nats.stream/max-age`
- `:nats.stream/max-bytes`
- `:nats.stream/max-consumers`
- `:nats.stream/max-messages`
- `:nats.stream/max-messages-per-subject`
- `:nats.stream/max-msg-size`
- `:nats.stream/replicas`
sourceraw docstring

delete-messageclj

(delete-message conn stream-name seq-n & [{:keys [erase?] :as opt}])

Delete the specific message from stream-name with seq-n.

Delete the specific message from `stream-name` with `seq-n`.
sourceraw docstring

delete-streamclj

(delete-stream conn stream-name)
source

discard-policiesclj

Available discard policies:

  • :nats.discard-policy/new
  • :nats.discard-policy/old
Available discard policies:

- `:nats.discard-policy/new`
- `:nats.discard-policy/old`
sourceraw docstring

get-account-statisticsclj

(get-account-statistics conn)
source

get-cluster-infoclj

(get-cluster-info conn stream-name & [options])
source

get-first-messageclj

(get-first-message conn stream-name subject)
source

get-last-messageclj

(get-last-message conn stream-name subject)
source

get-messageclj

(get-message conn stream-name seq)
source

get-mirror-infoclj

(get-mirror-info conn stream-name & [opts])

Get the mirror info for stream-name. opts is a map of:

  • :include-deleted-details?
  • :filter-subjects
Get the mirror info for `stream-name`. `opts` is a map of:

- `:include-deleted-details?`
- `:filter-subjects`
sourceraw docstring

get-next-messageclj

(get-next-message conn stream-name seq subject)
source

get-stream-configclj

(get-stream-config conn stream-name & [opts])

Get the configuration for stream-name. opts is a map of:

  • :include-deleted-details?
  • :filter-subjects
Get the configuration for `stream-name`. `opts` is a map of:

- `:include-deleted-details?`
- `:filter-subjects`
sourceraw docstring

get-stream-infoclj

(get-stream-info conn stream-name & [opts])

Get the information about stream-name. opts is a map of:

  • :include-deleted-details?
  • :filter-subjects
Get the information about `stream-name`. `opts` is a map of:

- `:include-deleted-details?`
- `:filter-subjects`
sourceraw docstring

get-stream-namesclj

(get-stream-names conn & [{:keys [subject-filter]}])
source

get-stream-stateclj

(get-stream-state conn stream-name & [opts])

Get the state for stream-name. opts is a map of:

  • :include-deleted-details?
  • :filter-subjects
Get the state for `stream-name`. `opts` is a map of:

- `:include-deleted-details?`
- `:filter-subjects`
sourceraw docstring

get-streamsclj

(get-streams conn & [{:keys [subject-filter]}])
source

publishclj

(publish conn message & [opts])

Publish a message to a JetStream subject. Performs publish acking if the stream requires it. Use nats.core/publish for regular PubSub messaging.

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.

opts is a map of:

  • :expected-last-msg-id
  • :expected-last-sequence
  • :expected-last-subject-sequence
  • :expected-stream
  • :message-id
  • :stream
  • :stream-timeout
Publish a message to a JetStream subject. Performs publish acking if the stream
 requires it. Use `nats.core/publish` for regular PubSub messaging.

`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.

`opts` is a map of:

- `:expected-last-msg-id`
- `:expected-last-sequence`
- `:expected-last-subject-sequence`
- `:expected-stream`
- `:message-id`
- `:stream`
- `:stream-timeout`
sourceraw docstring

purge-streamclj

(purge-stream conn stream-name & [opts])

Purge stream stream-name. opts is a map of:

  • :keep
  • :sequence
  • :subject
Purge stream `stream-name`. `opts` is a map of:

- `:keep`
- `:sequence`
- `:subject`
sourceraw docstring

retention-policiesclj

Available retention policies:

  • :nats.retention-policy/limits
  • :nats.retention-policy/work-queue
  • :nats.retention-policy/interest
Available retention policies:

- `:nats.retention-policy/limits`
- `:nats.retention-policy/work-queue`
- `:nats.retention-policy/interest`
sourceraw docstring

storage-typesclj

Available storage types

  • :nats.storage-type/file
  • :nats.storage-type/memory
Available storage types

- `:nats.storage-type/file`
- `:nats.storage-type/memory`
sourceraw docstring

update-streamclj

(update-stream conn config)

Updates a stream. See create-stream for valid options in config.

Updates a stream. See `create-stream` for valid options in `config`.
sourceraw docstring

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

× close