Core Cues API.
Core Cues API.
(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!
(all-messages queue)
Eagerly gets all messages in the cue. Could be many!
Eagerly gets all messages in the cue. Could be many!
(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!!.
(appender {q :queue-impl :as queue})
(appender? x)
(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.
(close-and-delete-try-queues! g)
(close-graph! graph)
(close-queue! {q :queue-impl :as queue})
Closes the given queue.
Closes the given queue.
(close-tailer! tailer)
Closes the given tailer.
Closes the given tailer.
(collect-graph-queues {:keys [processors queues]})
(continue? {unblock :unblock :as obj})
(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.
(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.
(delete-unused-queue-files! queue)
(get-fork-queue process)
(get-try-queues process)
(graph g)
(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!
(id->str id)
(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.
(isomorphic? g1 g2)
(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.
(last-read-index* tailer)
(log-processor-error {{:keys [id in alts out] :or {in "source" out "sink"}}
:config}
e)
(messages tailer)
Returns a lazy list of all remaining messages.
Returns a lazy list of all remaining messages.
(mono-inc old new)
Monotonically increases counter.
Monotonically increases counter.
(peek tailer)
Like read, but does not advance tailer.
Like read, but does not advance tailer.
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.
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.
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.
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.
Analogous to Kafka processors. No default method.
Analogous to Kafka processors. No default method.
(processor? x)
(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.
Returns the underlying ChronicleQueue object.
Returns the underlying ChronicleQueue object.
(queue? x)
(read tailer)
Reads message from tailer without blocking. Materializes metadata in message.
Reads message from tailer without blocking. Materializes metadata in message.
(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.
(send! graph msg)
(send! {p :processors config :config} source msg)
(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.
(start-graph! graph)
(start-processor! {:keys [id state impl] :as process})
(stop-graph! graph)
(stop-processor! {:keys [id state impl] :as process})
(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.
(tailer? x)
(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.
(to-index* {t :tailer-impl d :dirty :as tailer} i)
(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.
(topology graph)
Transient queues are purged after 10 days.
Transient queues are purged after 10 days.
(unhandled-error msg & body)
(unused-queue-files queue)
(with-tailer bindings & body)
(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.
Returns the index written by the appender. Only rebind for testing!
Returns the index written by the appender. Only rebind for testing!
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close