the factory for creating command executors for a protocol
Delete a queue.
Delete a queue. Removes the journal file on the remote server.
Flush a queue.
Flush a queue. Empties all items from the queue without deleting the journal.
Dequeue an item.
Dequeue an item.
if the queue is empty, indicate to the Kestrel server how long to block the operation, waiting for something to arrive, before returning None. 0.seconds (the default) means no waiting, as opposed to infinite wait.
Read indefinitely from the given queue with transactions.
Read indefinitely from the given queue with transactions. Note that {{read}} will reserve a connection for the duration of the read. Note that this does no buffering: we await acknowledment (through synchronizing on ReadMessage.ack) before acknowledging that message to the kestrel server & reading the next one.
A read handle.
Enqueue an item.
Enqueue an item.
how long the item is valid for (Kestrel will delete the item if it isn't dequeued in time). Time.epoch (0) means the item will never expire.
Close any consume resources such as TCP Connections.
Close any consume resources such as TCP Connections. This should will not release resources created by the from() and to() methods; it is the responsibility of the caller to release those resources directly.
Read indefinitely from a underlying service
Read indefinitely from a underlying service
function to process a raw reply into: Return(Some()) successful read of a single item, Return(None) successful read of zero items, or Throw() invalid reply
the command to open a read
the command to ack and open a read
the command to abort a read
a ReadHandle
{{readReliably}} with infinite, 0-second backoff retries.
{{readReliably}} with infinite, 0-second backoff retries.
Read from a queue reliably: retry streaming reads on failure (which may indeed be backed by multiple kestrel hosts).
Read from a queue reliably: retry streaming reads on failure (which may indeed be backed by multiple kestrel hosts). This presents to the user a virtual "reliable" stream of messages, and errors are transparent.
the queue to read from
a timer used to delay retries
a (possibly infinite) stream of durations comprising a backoff policy
Note: the use of call-by-name for the stream is in order to ensure that we do not suffer a space leak for infinite retries.
Write indefinitely to the given queue.
Write indefinitely to the given queue. The given offer is synchronized on indefinitely, writing the items as they become available. Unlike {{read}}, {{write}} does not reserve a connection.
a Future indicating client failure.
Common base class for clients using different protocols
the type that executes commands using some protocol
the type of reply that {{CommandExecutor}} returns
the type used by {{CommandExecutor}} to identify returned items