Liking cljdoc? Tell your friends :D

cues.queue

Core Cues API.

Core Cues API.
raw docstring

add-attempt-hashclj

Only rebind in testing.

Only rebind in testing.
sourceraw docstring

all-graph-messagesclj

(all-graph-messages {queues :queues})

Eagerly gets all messages in the graph. Could be many!

Eagerly gets all messages in the graph. Could be many!
sourceraw docstring

all-messagesclj

(all-messages queue)

Eagerly gets all messages in the cue. Could be many!

Eagerly gets all messages in the cue. Could be many!
sourceraw docstring

alts!!clj

(alts!! tailers)

Completes at most one blocking read from several tailers. Semantics of each read are that or read!!.

Completes at most one blocking read from several tailers. Semantics
of each read are that or read!!.
sourceraw docstring

appenderclj

(appender {q :queue-impl :as queue})
source

appender?clj

(appender? x)
source

attempt-indexclj

Only rebind for tesitng!

Only rebind for tesitng!
sourceraw docstring

close-and-delete-graph!clj

(close-and-delete-graph! g)
(close-and-delete-graph! g force)

Closes the graph and all queues and deletes all queue data.

Closes the graph and all queues and deletes all queue data.
sourceraw docstring

close-and-delete-try-queues!clj

(close-and-delete-try-queues! g)
source

close-graph!clj

(close-graph! graph)
source

close-queue!clj

(close-queue! {q :queue-impl :as queue})

Closes the given queue.

Closes the given queue.
sourceraw docstring

close-tailer!clj

(close-tailer! tailer)

Closes the given tailer.

Closes the given tailer.
sourceraw docstring

collect-graph-queuesclj

(collect-graph-queues {:keys [processors queues]})
source

continue?clj

(continue? {unblock :unblock :as obj})
source

delete-all-queues!clj

(delete-all-queues!)
(delete-all-queues! queue-path)

Deletes all queue data at either the provided or default path.

Implementation note: must also purge the queue controller or blocking will break the next time the queue is made.

Deletes all queue data at either the provided or default path.

Implementation note: must also purge the queue controller or
blocking will break the next time the queue is made.
sourceraw docstring

delete-queue!clj

(delete-queue! queue)
(delete-queue! queue force)

Deletes the queue data on disk, prompting by default.

Implementation note: must also purge the queue controller or blocking will break the next time the queue is made.

Deletes the queue data on disk, prompting by default.

Implementation note: must also purge the queue controller or
blocking will break the next time the queue is made.
sourceraw docstring

delete-unused-queue-files!clj

(delete-unused-queue-files! queue)
source

get-fork-queueclj

(get-fork-queue process)
source

get-try-queuesclj

(get-try-queues process)
source

graphclj

(graph g)
source

graph-messagesclj

(graph-messages {queues :queues} id)

Eagerly gets all messages in the queue. Could be many!

Eagerly gets all messages in the queue. Could be many!
sourceraw docstring

id->strclj

(id->str id)
source

indexclj

Only rebind for testing!

Only rebind for testing!
sourceraw docstring

index*clj

(index* {t :tailer-impl d :dirty :as tailer})

Gets the index at the tailer's current position. ChronicleQueue tailers do not update their current index after changing direction until AFTER the next read. Cues guards against this edge case by throwing an error if you attempt to take the index before the next read.

Gets the index at the tailer's current position. ChronicleQueue
tailers do not update their current index after changing direction
until AFTER the next read. Cues guards against this edge case by
throwing an error if you attempt to take the index before the next
read.
sourceraw docstring

isomorphic?clj

(isomorphic? g1 g2)
source

last-indexclj

Only rebind for testing!

Only rebind for testing!
sourceraw docstring

last-index*clj

(last-index* x)

A last index implementation that works for any kind of queue or appender. Note that appenders and queues will not necessarily return the same result, and appenders will throw an error if they have not appended anything yet.

A last index implementation that works for any kind of queue or
appender. Note that appenders and queues will not necessarily return
the same result, and appenders will throw an error if they have not
appended anything yet.
sourceraw docstring

last-read-indexclj

Only rebind for testing!

Only rebind for testing!
sourceraw docstring

last-read-index*clj

(last-read-index* tailer)
source

log-processor-errorclj

(log-processor-error {{:keys [id in alts out] :or {in "source" out "sink"}}
                        :config}
                     e)
source

messagesclj

(messages tailer)

Returns a lazy list of all remaining messages.

Returns a lazy list of all remaining messages.
sourceraw docstring

mono-incclj

(mono-inc old new)

Monotonically increases counter.

Monotonically increases counter.
sourceraw docstring

peekclj

(peek tailer)

Like read, but does not advance tailer.

Like read, but does not advance tailer.
sourceraw docstring

persistent-attemptcljmultimethod

Persists message to processor output queues, as well as attempt data to backing queue. Called once during each processor step. Taken together, persistent-snapshot, persistent-attempt, and persistent-recover implement message delivery semantics in Cues processors.

Persists message to processor output queues, as well as attempt data
to backing queue. Called once during each processor step. Taken
together, persistent-snapshot, persistent-attempt, and
persistent-recover implement message delivery semantics in Cues
processors.
sourceraw docstring

persistent-recovercljmultimethod

Recovers processor tailer indices from backing queue once on processor start. Taken together, persistent-snapshot, persistent-attempt, and persistent-recover implement message delivery semantics in Cues processors.

Recovers processor tailer indices from backing queue once on
processor start. Taken together, persistent-snapshot,
persistent-attempt, and persistent-recover implement message
delivery semantics in Cues processors.
sourceraw docstring

persistent-snapshotcljmultimethod

Persists processor tailer indices to a backing queue. Called once before each processor step. Taken together, persistent-snapshot, persistent-attempt, and persistent-recover implement message delivery semantics in Cues processors.

Persists processor tailer indices to a backing queue. Called once
before each processor step. Taken together, persistent-snapshot,
persistent-attempt, and persistent-recover implement message
delivery semantics in Cues processors.
sourceraw docstring

persistent-snapshot-altscljmultimethod

Persists the alts processor tailer id to a backing queue. Called immediately after the processor alts read. Taken together, persistent-snapshot, persistent-attempt, and persistent-recover implement message delivery semantics in Cues processors.

Persists the alts processor tailer id to a backing queue. Called
immediately after the processor alts read. Taken together,
persistent-snapshot, persistent-attempt, and persistent-recover
implement message delivery semantics in Cues processors.
sourceraw docstring

processorcljmultimethod

Analogous to Kafka processors. No default method.

Analogous to Kafka processors. No default method.
sourceraw docstring

processor?clj

(processor? x)
source

queueclj

(queue id)
(queue id opts*)

Creates a persistent blocking queue.

Options include:

:transient A Boolean. If true, queue backing file will be rolled daily, and deleted after 10 days. You can configure alternative behaviour using the :roll-cycle, :cycle-release-tasks and :cycle-acquire-tasks options described below.

The following options are passed along to the underlying implementation:

:roll-cycle How frequently the queue data file on disk is rolled over. Default is :small-daily. Can be:

      :minutely, :daily, :test4-daily, :test-hourly, :hourly,
      :test-secondly, :huge-daily-xsparse, :test-daily,
      :large-hourly-xsparse, :large-daily, :test2-daily,
      :xlarge-daily, :huge-daily, :large-hourly, :small-daily,
      :large-hourly-sparse

:autoclose-on-jvm-exit? A Boolean. Whether to cleanly close the JVM on exit. Default is true.

:cycle-release-tasks Tasks to run on queue cycle release. For more, see qbits.tape.cycle-listener in the Tape library.

:cycle-acquire-tasks Tasks to run on queue cycle acquisition. For more, see qbits.tape.cycle-listener in the Tape library.

Creates a persistent blocking queue.

Options include:

:transient
          A Boolean. If true, queue backing file will be rolled
          daily, and deleted after 10 days. You can configure
          alternative behaviour using the :roll-cycle,
          :cycle-release-tasks and :cycle-acquire-tasks options
          described below.

The following options are passed along to the underlying
implementation:

:roll-cycle
          How frequently the queue data file on disk is rolled
          over. Default is :small-daily. Can be:

          :minutely, :daily, :test4-daily, :test-hourly, :hourly,
          :test-secondly, :huge-daily-xsparse, :test-daily,
          :large-hourly-xsparse, :large-daily, :test2-daily,
          :xlarge-daily, :huge-daily, :large-hourly, :small-daily,
          :large-hourly-sparse

:autoclose-on-jvm-exit?
          A Boolean. Whether to cleanly close the JVM on
          exit. Default is true.

:cycle-release-tasks
          Tasks to run on queue cycle release. For more, see
          qbits.tape.cycle-listener in the Tape library.

:cycle-acquire-tasks
          Tasks to run on queue cycle acquisition. For more, see
          qbits.tape.cycle-listener in the Tape library.
sourceraw docstring

queue-closed?clj

source

queue-objclj

Returns the underlying ChronicleQueue object.

Returns the underlying ChronicleQueue object.
sourceraw docstring

queue-path-defaultclj

source

queue?clj

(queue? x)
source

readclj

(read tailer)

Reads message from tailer without blocking. Materializes metadata in message.

Reads message from tailer without blocking. Materializes metadata in
message.
sourceraw docstring

read!!clj

(read!! tailer)

Blocking read. The tailer will consume eagerly if it can. If not, it will block until a new message is available. Implementation note: it is critical that the watch be placed before the first read. Note that the tailer index will always be ahead of the last index it read. Read will continue and return nil if at any point an unblock signal is received. This allows blocked threads to be cleaned up on unblock events.

Blocking read. The tailer will consume eagerly if it can. If not, it
will block until a new message is available. Implementation note: it
is critical that the watch be placed before the first read. Note
that the tailer index will always be ahead of the last index it
read. Read will continue and return nil if at any point an unblock
signal is received. This allows blocked threads to be cleaned up on
unblock events.
sourceraw docstring

send!clj

(send! graph msg)
(send! {p :processors config :config} source msg)
source

set-directionclj

(set-direction {t :tailer-impl d :dirty :as tailer} direction)

Sets the direction of the tailer to either :forward or :backward. Note: after changing the direction on the tailer you must do a read before you can measure the index again via cues.queue/index. This is an artifact of ChronicleQueue behaviour.

Sets the direction of the tailer to either :forward
or :backward. Note: after changing the direction on the tailer you
must do a read before you can measure the index again via
`cues.queue/index`. This is an artifact of ChronicleQueue
behaviour.
sourceraw docstring

start-graph!clj

(start-graph! graph)
source

start-processor!clj

(start-processor! {:keys [id state impl] :as process})
source

start-processor-implcljmultimethod

source

stop-graph!clj

(stop-graph! graph)
source

stop-processor!clj

(stop-processor! {:keys [id state impl] :as process})
source

tailerclj

(tailer queue)
(tailer queue id)
(tailer queue id unblock)

Creates a tailer.

Providing an id enables tailer position on the queue to persist across restarts. You can also optionally provide an unblock reference that when set to true will prevent the tailer from blocking. This is typically used to unblock and clean up blocked processor threads.

Creates a tailer.

Providing an id enables tailer position on the queue to persist
across restarts. You can also optionally provide an unblock
reference that when set to true will prevent the tailer from
blocking. This is typically used to unblock and clean up blocked
processor threads.
sourceraw docstring

tailer?clj

(tailer? x)
source

to-endclj

(to-end {t :tailer-impl d :dirty :as tailer})

Moves the tailer to the end of the queue.

Moves the tailer to the end of the queue.
sourceraw docstring

to-indexclj

Only rebind for testing!

Only rebind for testing!
sourceraw docstring

to-index*clj

(to-index* {t :tailer-impl d :dirty :as tailer} i)
source

to-startclj

(to-start {t :tailer-impl d :dirty :as tailer})

Moves the tailer to the beginning of the queue.

Moves the tailer to the beginning of the queue.
sourceraw docstring

topologyclj

(topology graph)
source

transient-queue-optsclj

Transient queues are purged after 10 days.

Transient queues are purged after 10 days.
sourceraw docstring

unhandled-errorcljmacro

(unhandled-error msg & body)
source

unused-queue-filesclj

(unused-queue-files queue)
source

with-tailercljmacro

(with-tailer bindings & body)
source

writeclj

(write appender msg)

The queue controller approximately follows the index of the queue: it can fall behind, but must be eventually consistent.

The queue controller approximately follows the index of the queue: it
can fall behind, but must be eventually consistent.
sourceraw docstring

written-indexclj

Returns the index written by the appender. Only rebind for testing!

Returns the index written by the appender. Only rebind for testing!
sourceraw docstring

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

× close