-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathlangohr.queue.html
34 lines (26 loc) · 11.7 KB
/
langohr.queue.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>langohr.queue documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Langohr</span> <span class="project-version">6.0.0-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>langohr</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>amqp091</span></div></div></li><li class="depth-3"><a href="langohr.amqp091.inspection.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>inspection</span></div></a></li><li class="depth-2 branch"><a href="langohr.basic.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>basic</span></div></a></li><li class="depth-2 branch"><a href="langohr.channel.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>channel</span></div></a></li><li class="depth-2 branch"><a href="langohr.confirm.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>confirm</span></div></a></li><li class="depth-2 branch"><a href="langohr.consumers.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>consumers</span></div></a></li><li class="depth-2 branch"><a href="langohr.conversion.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>conversion</span></div></a></li><li class="depth-2 branch"><a href="langohr.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="langohr.exchange.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>exchange</span></div></a></li><li class="depth-2 branch"><a href="langohr.http.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>http</span></div></a></li><li class="depth-2 branch"><a href="langohr.http2.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>http2</span></div></a></li><li class="depth-2 branch current"><a href="langohr.queue.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>queue</span></div></a></li><li class="depth-2 branch"><a href="langohr.shutdown.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>shutdown</span></div></a></li><li class="depth-2 branch"><a href="langohr.tx.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tx</span></div></a></li><li class="depth-2"><a href="langohr.util.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>util</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="langohr.queue.html#var-bind"><div class="inner"><span>bind</span></div></a></li><li class="depth-1"><a href="langohr.queue.html#var-consumer-count"><div class="inner"><span>consumer-count</span></div></a></li><li class="depth-1"><a href="langohr.queue.html#var-declare"><div class="inner"><span>declare</span></div></a></li><li class="depth-1"><a href="langohr.queue.html#var-declare-passive"><div class="inner"><span>declare-passive</span></div></a></li><li class="depth-1"><a href="langohr.queue.html#var-declare-server-named"><div class="inner"><span>declare-server-named</span></div></a></li><li class="depth-1"><a href="langohr.queue.html#var-delete"><div class="inner"><span>delete</span></div></a></li><li class="depth-1"><a href="langohr.queue.html#var-empty.3F"><div class="inner"><span>empty?</span></div></a></li><li class="depth-1"><a href="langohr.queue.html#var-message-count"><div class="inner"><span>message-count</span></div></a></li><li class="depth-1"><a href="langohr.queue.html#var-purge"><div class="inner"><span>purge</span></div></a></li><li class="depth-1"><a href="langohr.queue.html#var-status"><div class="inner"><span>status</span></div></a></li><li class="depth-1"><a href="langohr.queue.html#var-unbind"><div class="inner"><span>unbind</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">langohr.queue</h1><div class="doc"><pre class="plaintext">Functions that provide operations on queues.
Relevant guides:
<a href="http://clojurerabbitmq.info/articles/queues.html">http://clojurerabbitmq.info/articles/queues.html</a></pre></div><div class="public anchor" id="var-bind"><h3>bind</h3><div class="usage"><code>(bind ch queue exchange)</code><code>(bind ch queue exchange {:keys [routing-key arguments], :or {routing-key "", arguments nil}})</code></div><div class="doc"><pre class="plaintext">Binds a queue to an exchange using queue.bind AMQP method
</pre></div><div class="src-link"><a href="https://github.com/michaelklishin/langohr/blob/v6.0.0-SNAPSHOT/src/clojure/langohr/queue.clj#L93">view source</a></div></div><div class="public anchor" id="var-consumer-count"><h3>consumer-count</h3><div class="usage"><code>(consumer-count ch queue)</code></div><div class="doc"><pre class="plaintext">Returns a number of active consumers on the queue
</pre></div><div class="src-link"><a href="https://github.com/michaelklishin/langohr/blob/v6.0.0-SNAPSHOT/src/clojure/langohr/queue.clj#L139">view source</a></div></div><div class="public anchor" id="var-declare"><h3>declare</h3><div class="usage"><code>(declare ch)</code><code>(declare ch queue)</code><code>(declare ch queue {:keys [durable exclusive auto-delete arguments], :or {durable false, exclusive false, auto-delete true}})</code></div><div class="doc"><pre class="plaintext">Actively declare a server-named or named queue using queue.declare AMQP method.
Usage example:
;; declare server-named, exclusive, autodelete, non-durable queue.
(lhq/declare channel) ;; will return a map that contains the name: {:queue "amq.gen-QtE7OdDDjlHcxNGWuSoUb3"}
;; creates named non-durable, exclusive, autodelete queue
(lhq/declare channel queue-name {:durable false :exclusive true :auto-delete true})
Options
:durable (default: false): indicates wether the queue is durable. Durable queue will survive server restart. Durable queues do not neccessarily hold persistent messages. Using persistent messages with transient queues is allowed, but will not save messages between restarts.
:exclusive (default: false): when set to true, indicates that the queue is exclusive. No other subscriber can consume form that queue. Exclusive always implies auto-delete, as messages are delivered to the single consumer. When set to false, allows multiple consumers.
:auto-delete (default: true): when set to true, queue will be purged as soon as last consumer stops is finished using it. If consumer never got attached to the queue, it won't get deleted.
:arguments: other properties for the Queue.
</pre></div><div class="src-link"><a href="https://github.com/michaelklishin/langohr/blob/v6.0.0-SNAPSHOT/src/clojure/langohr/queue.clj#L50">view source</a></div></div><div class="public anchor" id="var-declare-passive"><h3>declare-passive</h3><div class="usage"><code>(declare-passive ch queue)</code></div><div class="doc"><pre class="plaintext">Declares a queue passively (checks that it is there) using queue.declare AMQP method
</pre></div><div class="src-link"><a href="https://github.com/michaelklishin/langohr/blob/v6.0.0-SNAPSHOT/src/clojure/langohr/queue.clj#L78">view source</a></div></div><div class="public anchor" id="var-declare-server-named"><h3>declare-server-named</h3><div class="usage"><code>(declare-server-named ch)</code><code>(declare-server-named ch {:keys [durable exclusive auto-delete arguments], :or {durable false, exclusive false, auto-delete true}})</code></div><div class="doc"><pre class="plaintext">Declares a server-named queue and returns its name.
</pre></div><div class="src-link"><a href="https://github.com/michaelklishin/langohr/blob/v6.0.0-SNAPSHOT/src/clojure/langohr/queue.clj#L83">view source</a></div></div><div class="public anchor" id="var-delete"><h3>delete</h3><div class="usage"><code>(delete ch queue)</code><code>(delete ch queue if-unused if-empty)</code></div><div class="doc"><pre class="plaintext">Deletes a queue using queue.delete AMQP method
</pre></div><div class="src-link"><a href="https://github.com/michaelklishin/langohr/blob/v6.0.0-SNAPSHOT/src/clojure/langohr/queue.clj#L112">view source</a></div></div><div class="public anchor" id="var-empty.3F"><h3>empty?</h3><div class="usage"><code>(empty? ch queue)</code></div><div class="doc"><pre class="plaintext">Returns true if queue is empty (has no messages ready), false otherwise
</pre></div><div class="src-link"><a href="https://github.com/michaelklishin/langohr/blob/v6.0.0-SNAPSHOT/src/clojure/langohr/queue.clj#L144">view source</a></div></div><div class="public anchor" id="var-message-count"><h3>message-count</h3><div class="usage"><code>(message-count ch queue)</code></div><div class="doc"><pre class="plaintext">Returns a number of messages that are ready for delivery (e.g. not pending acknowledgements)
in the queue</pre></div><div class="src-link"><a href="https://github.com/michaelklishin/langohr/blob/v6.0.0-SNAPSHOT/src/clojure/langohr/queue.clj#L133">view source</a></div></div><div class="public anchor" id="var-purge"><h3>purge</h3><div class="usage"><code>(purge ch queue)</code></div><div class="doc"><pre class="plaintext">Purges a queue using queue.purge AMQP method
</pre></div><div class="src-link"><a href="https://github.com/michaelklishin/langohr/blob/v6.0.0-SNAPSHOT/src/clojure/langohr/queue.clj#L120">view source</a></div></div><div class="public anchor" id="var-status"><h3>status</h3><div class="usage"><code>(status ch queue)</code></div><div class="doc"><pre class="plaintext">Returns a map with two keys: message-count and :consumer-count, for the given queue.
Uses queue.declare AMQP method with the :passive attribute set.</pre></div><div class="src-link"><a href="https://github.com/michaelklishin/langohr/blob/v6.0.0-SNAPSHOT/src/clojure/langohr/queue.clj#L126">view source</a></div></div><div class="public anchor" id="var-unbind"><h3>unbind</h3><div class="usage"><code>(unbind ch queue exchange)</code><code>(unbind ch queue exchange routing-key)</code><code>(unbind ch queue exchange routing-key arguments)</code></div><div class="doc"><pre class="plaintext">Unbinds a queue from an exchange using queue.bind AMQP method
</pre></div><div class="src-link"><a href="https://github.com/michaelklishin/langohr/blob/v6.0.0-SNAPSHOT/src/clojure/langohr/queue.clj#L102">view source</a></div></div></div></body></html>