diff options
Diffstat (limited to 'reference')
-rw-r--r-- | reference/index.html | 133 | ||||
-rw-r--r-- | reference/kombu.abstract.html | 58 | ||||
-rw-r--r-- | reference/kombu.compat.html | 461 | ||||
-rw-r--r-- | reference/kombu.compression.html | 133 | ||||
-rw-r--r-- | reference/kombu.connection.html | 434 | ||||
-rw-r--r-- | reference/kombu.entity.html | 229 | ||||
-rw-r--r-- | reference/kombu.exceptions.html | 85 | ||||
-rw-r--r-- | reference/kombu.messaging.html | 520 | ||||
-rw-r--r-- | reference/kombu.pidbox.html | 212 | ||||
-rw-r--r-- | reference/kombu.serialization.html | 209 | ||||
-rw-r--r-- | reference/kombu.simple.html | 229 | ||||
-rw-r--r-- | reference/kombu.transport.base.html | 199 | ||||
-rw-r--r-- | reference/kombu.transport.html | 50 | ||||
-rw-r--r-- | reference/kombu.transport.memory.html | 84 | ||||
-rw-r--r-- | reference/kombu.transport.pyamqplib.html | 246 | ||||
-rw-r--r-- | reference/kombu.transport.pypika.html | 174 | ||||
-rw-r--r-- | reference/kombu.transport.pyredis.html | 108 | ||||
-rw-r--r-- | reference/kombu.transport.virtual.html | 636 | ||||
-rw-r--r-- | reference/kombu.utils.functional.html | 16 | ||||
-rw-r--r-- | reference/kombu.utils.html | 38 |
20 files changed, 3096 insertions, 1158 deletions
diff --git a/reference/index.html b/reference/index.html index 770886b4..1236f773 100644 --- a/reference/index.html +++ b/reference/index.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>API Reference — Kombu v0.9.0 documentation</title> + <title>API Reference — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,8 +21,8 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> - <link rel="next" title="Broker Connections - kombu.connection" href="kombu.connection.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> + <link rel="next" title="kombu.connection" href="kombu.connection.html" /> <link rel="prev" title="Frequently Asked Questions" href="../faq.html" /> </head> <body> @@ -36,12 +36,12 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.connection.html" title="Broker Connections - kombu.connection" + <a href="kombu.connection.html" title="kombu.connection" accesskey="N">next</a> |</li> <li class="right" > <a href="../faq.html" title="Frequently Asked Questions" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> </ul> </div> @@ -58,36 +58,105 @@ <tbody valign="top"> <tr class="field"><th class="field-name">Release:</th><td class="field-body">0.9</td> </tr> -<tr class="field"><th class="field-name">Date:</th><td class="field-body">October 21, 2010</td> +<tr class="field"><th class="field-name">Date:</th><td class="field-body">October 27, 2010</td> </tr> </tbody> </table> <div class="toctree-wrapper compound"> <ul> -<li class="toctree-l1"><a class="reference internal" href="kombu.connection.html">Broker Connections - kombu.connection</a></li> -<li class="toctree-l1"><a class="reference internal" href="kombu.simple.html">Simple Interface - kombu.simple</a></li> -<li class="toctree-l1"><a class="reference internal" href="kombu.messaging.html">Messaging - kombu.messaging</a></li> -<li class="toctree-l1"><a class="reference internal" href="kombu.entity.html">AMQP Entities - kombu.entity</a></li> -<li class="toctree-l1"><a class="reference internal" href="kombu.compat.html">Carrot Compatible API - kombu.compat</a></li> -<li class="toctree-l1"><a class="reference internal" href="kombu.pidbox.html">Process Mailbox - kombu.pidbox</a><ul> -<li class="toctree-l2"><a class="reference internal" href="kombu.pidbox.html#creating-the-applications-mailbox">Creating the applications Mailbox</a></li> -<li class="toctree-l2"><a class="reference internal" href="kombu.pidbox.html#example-node">Example Node</a></li> -<li class="toctree-l2"><a class="reference internal" href="kombu.pidbox.html#example-client">Example Client</a></li> +<li class="toctree-l1"><a class="reference internal" href="kombu.connection.html">kombu.connection</a><ul> +<li class="toctree-l2"><a class="reference internal" href="kombu.connection.html#connection">Connection</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.connection.html#pools">Pools</a></li> </ul> </li> -<li class="toctree-l1"><a class="reference internal" href="kombu.exceptions.html">Exceptions - kombu.exceptions</a></li> -<li class="toctree-l1"><a class="reference internal" href="kombu.transport.html">Transports - kombu.transport</a></li> -<li class="toctree-l1"><a class="reference internal" href="kombu.transport.pypika.html">pika Transport - kombu.transport.pypika</a></li> -<li class="toctree-l1"><a class="reference internal" href="kombu.transport.pyamqplib.html">amqplib Transport - kombu.transport.pyamqplib</a></li> -<li class="toctree-l1"><a class="reference internal" href="kombu.transport.pyredis.html">Redis Transport - kombu.transport.pyredis</a></li> -<li class="toctree-l1"><a class="reference internal" href="kombu.transport.memory.html">In-memory Transport - kombu.transport.memory</a></li> -<li class="toctree-l1"><a class="reference internal" href="kombu.transport.base.html">Base Transport Interface - kombu.transport.base</a></li> -<li class="toctree-l1"><a class="reference internal" href="kombu.transport.virtual.html">Virtual Transport Interface - kombu.transport.virtual</a></li> -<li class="toctree-l1"><a class="reference internal" href="kombu.serialization.html">Serialization - kombu.serialization</a></li> -<li class="toctree-l1"><a class="reference internal" href="kombu.compression.html">Compression - kombu.compression</a></li> -<li class="toctree-l1"><a class="reference internal" href="kombu.abstract.html">Object Utilities - kombu.abstract</a></li> +<li class="toctree-l1"><a class="reference internal" href="kombu.simple.html">kombu.simple</a><ul> +<li class="toctree-l2"><a class="reference internal" href="kombu.simple.html#persistent">Persistent</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.simple.html#buffer">Buffer</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="kombu.messaging.html">kombu.messaging</a><ul> +<li class="toctree-l2"><a class="reference internal" href="kombu.messaging.html#message-producer">Message Producer</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.messaging.html#message-consumer">Message Consumer</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="kombu.entity.html">kombu.entity</a><ul> +<li class="toctree-l2"><a class="reference internal" href="kombu.entity.html#exchange">Exchange</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.entity.html#queue">Queue</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="kombu.compat.html">kombu.compat</a><ul> +<li class="toctree-l2"><a class="reference internal" href="kombu.compat.html#publisher">Publisher</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.compat.html#consumer">Consumer</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.compat.html#consumerset">ConsumerSet</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="kombu.pidbox.html">kombu.pidbox</a><ul> +<li class="toctree-l2"><a class="reference internal" href="kombu.pidbox.html#introduction">Introduction</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.pidbox.html#mailbox">Mailbox</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.pidbox.html#node">Node</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="kombu.exceptions.html">kombu.exceptions</a></li> +<li class="toctree-l1"><a class="reference internal" href="kombu.transport.pypika.html">kombu.transport.pypika</a><ul> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.pypika.html#transports">Transports</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.pypika.html#connections">Connections</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.pypika.html#channel">Channel</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.pypika.html#message">Message</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="kombu.transport.pyamqplib.html">kombu.transport.pyamqplib</a><ul> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.pyamqplib.html#transport">Transport</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.pyamqplib.html#connection">Connection</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.pyamqplib.html#channel">Channel</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.pyamqplib.html#message">Message</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="kombu.transport.pyredis.html">kombu.transport.pyredis</a><ul> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.pyredis.html#transport">Transport</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.pyredis.html#channel">Channel</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="kombu.transport.memory.html">kombu.transport.memory</a><ul> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.memory.html#transport">Transport</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.memory.html#channel">Channel</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="kombu.transport.base.html">kombu.transport.base</a><ul> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.base.html#message">Message</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.base.html#transport">Transport</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="kombu.transport.virtual.html">kombu.transport.virtual</a><ul> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.virtual.html#transports">Transports</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.virtual.html#channel">Channel</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.virtual.html#message">Message</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.virtual.html#quality-of-service">Quality Of Service</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.virtual.html#in-memory-state">In-memory State</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="kombu.transport.virtual.exchange.html">kombu.transport.virtual.exchange</a><ul> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.virtual.exchange.html#direct">Direct</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.virtual.exchange.html#topic">Topic</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.virtual.exchange.html#fanout">Fanout</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.transport.virtual.exchange.html#interface">Interface</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="kombu.transport.virtual.scheduling.html">kombu.transport.virtual.scheduling</a></li> +<li class="toctree-l1"><a class="reference internal" href="kombu.serialization.html">kombu.serialization</a><ul> +<li class="toctree-l2"><a class="reference internal" href="kombu.serialization.html#overview">Overview</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.serialization.html#exceptions">Exceptions</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.serialization.html#serialization">Serialization</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.serialization.html#registry">Registry</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="kombu.compression.html">kombu.compression</a><ul> +<li class="toctree-l2"><a class="reference internal" href="kombu.compression.html#encoding-decoding">Encoding/decoding</a></li> +<li class="toctree-l2"><a class="reference internal" href="kombu.compression.html#registry">Registry</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="kombu.abstract.html">kombu.compression</a></li> <li class="toctree-l1"><a class="reference internal" href="kombu.utils.html">Utilities - kombu.utils</a></li> -<li class="toctree-l1"><a class="reference internal" href="kombu.utils.functional.html">functools - kombu.utils.functional</a></li> +<li class="toctree-l1"><a class="reference internal" href="kombu.utils.functional.html">kombu.utils.functional</a></li> </ul> </div> </div> @@ -105,7 +174,7 @@ title="previous chapter">Frequently Asked Questions</a></p> <h4>Next topic</h4> <p class="topless"><a href="kombu.connection.html" - title="next chapter">Broker Connections - kombu.connection</a></p> + title="next chapter">kombu.connection</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../sources/reference/index.txt" @@ -138,17 +207,17 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.connection.html" title="Broker Connections - kombu.connection" + <a href="kombu.connection.html" title="kombu.connection" >next</a> |</li> <li class="right" > <a href="../faq.html" title="Frequently Asked Questions" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.abstract.html b/reference/kombu.abstract.html index b3912551..6a2ace6d 100644 --- a/reference/kombu.abstract.html +++ b/reference/kombu.abstract.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Object Utilities - kombu.abstract — Kombu v0.9.0 documentation</title> + <title>kombu.compression — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,10 +21,10 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> <link rel="next" title="Utilities - kombu.utils" href="kombu.utils.html" /> - <link rel="prev" title="Compression - kombu.compression" href="kombu.compression.html" /> + <link rel="prev" title="kombu.compression" href="kombu.compression.html" /> </head> <body> <div class="related"> @@ -40,9 +40,9 @@ <a href="kombu.utils.html" title="Utilities - kombu.utils" accesskey="N">next</a> |</li> <li class="right" > - <a href="kombu.compression.html" title="Compression - kombu.compression" + <a href="kombu.compression.html" title="kombu.compression" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -52,9 +52,24 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="object-utilities-kombu-abstract"> -<h1>Object Utilities - kombu.abstract<a class="headerlink" href="#object-utilities-kombu-abstract" title="Permalink to this headline">¶</a></h1> -<span class="target" id="module-kombu.abstract"></span><dl class="class"> + <span class="target" id="module-kombu.abstract"></span><div class="section" id="kombu-compression"> +<h1>kombu.compression<a class="headerlink" href="#kombu-compression" title="Permalink to this headline">¶</a></h1> +<p>Object utilities.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3"> +<li>2009 - 2010 by Ask Solem.</li> +</ol> +</td> +</tr> +<tr class="field"><th class="field-name">license:</th><td class="field-body"><p class="first last">BSD, see LICENSE for more details.</p> +</td> +</tr> +</tbody> +</table> +<dl class="class"> <dt id="kombu.abstract.MaybeChannelBound"> <em class="property">class </em><tt class="descclassname">kombu.abstract.</tt><tt class="descname">MaybeChannelBound</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.abstract.MaybeChannelBound" title="Permalink to this definition">¶</a></dt> <dd><p>Mixin for classes that can be bound to an AMQP channel.</p> @@ -67,12 +82,13 @@ <dl class="attribute"> <dt id="kombu.abstract.MaybeChannelBound.channel"> <tt class="descname">channel</tt><a class="headerlink" href="#kombu.abstract.MaybeChannelBound.channel" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dd><p>Current channel if the object is bound.</p> +</dd></dl> <dl class="attribute"> <dt id="kombu.abstract.MaybeChannelBound.is_bound"> <tt class="descname">is_bound</tt><a class="headerlink" href="#kombu.abstract.MaybeChannelBound.is_bound" title="Permalink to this definition">¶</a></dt> -<dd><p>Returns <tt class="xref docutils literal"><span class="pre">True</span></tt> if the entity is bound.</p> +<dd><p>Flag set if the channel is bound.</p> </dd></dl> <dl class="method"> @@ -82,6 +98,13 @@ </dd></dl> <dl class="method"> +<dt id="kombu.abstract.MaybeChannelBound.revive"> +<tt class="descname">revive</tt><big>(</big><em>channel</em><big>)</big><a class="headerlink" href="#kombu.abstract.MaybeChannelBound.revive" title="Permalink to this definition">¶</a></dt> +<dd><p>Revive channel afer connection re-established.</p> +<p>Used by <a class="reference internal" href="kombu.connection.html#kombu.connection.BrokerConnection.ensure" title="kombu.connection.BrokerConnection.ensure"><tt class="xref py py-meth docutils literal"><span class="pre">ensure()</span></tt></a>.</p> +</dd></dl> + +<dl class="method"> <dt id="kombu.abstract.MaybeChannelBound.when_bound"> <tt class="descname">when_bound</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.abstract.MaybeChannelBound.when_bound" title="Permalink to this definition">¶</a></dt> <dd><p>Callback called when the class is bound.</p> @@ -89,11 +112,6 @@ </dd></dl> -<dl class="class"> -<dt id="kombu.abstract.Object"> -<em class="property">class </em><tt class="descclassname">kombu.abstract.</tt><tt class="descname">Object</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.abstract.Object" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - </div> @@ -106,7 +124,7 @@ </a></p> <h4>Previous topic</h4> <p class="topless"><a href="kombu.compression.html" - title="previous chapter">Compression - kombu.compression</a></p> + title="previous chapter">kombu.compression</a></p> <h4>Next topic</h4> <p class="topless"><a href="kombu.utils.html" title="next chapter">Utilities - kombu.utils</a></p> @@ -145,15 +163,15 @@ <a href="kombu.utils.html" title="Utilities - kombu.utils" >next</a> |</li> <li class="right" > - <a href="kombu.compression.html" title="Compression - kombu.compression" + <a href="kombu.compression.html" title="kombu.compression" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.compat.html b/reference/kombu.compat.html index 727c2f9d..0aa96c0d 100644 --- a/reference/kombu.compat.html +++ b/reference/kombu.compat.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Carrot Compatible API - kombu.compat — Kombu v0.9.0 documentation</title> + <title>kombu.compat — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,10 +21,10 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> - <link rel="next" title="Process Mailbox - kombu.pidbox" href="kombu.pidbox.html" /> - <link rel="prev" title="AMQP Entities - kombu.entity" href="kombu.entity.html" /> + <link rel="next" title="kombu.pidbox" href="kombu.pidbox.html" /> + <link rel="prev" title="kombu.entity" href="kombu.entity.html" /> </head> <body> <div class="related"> @@ -37,12 +37,12 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.pidbox.html" title="Process Mailbox - kombu.pidbox" + <a href="kombu.pidbox.html" title="kombu.pidbox" accesskey="N">next</a> |</li> <li class="right" > - <a href="kombu.entity.html" title="AMQP Entities - kombu.entity" + <a href="kombu.entity.html" title="kombu.entity" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -52,17 +52,133 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="carrot-compatible-api-kombu-compat"> -<h1>Carrot Compatible API - kombu.compat<a class="headerlink" href="#carrot-compatible-api-kombu-compat" title="Permalink to this headline">¶</a></h1> -<span class="target" id="module-kombu.compat"></span><dl class="class"> + <span class="target" id="module-kombu.compat"></span><div class="section" id="kombu-compat"> +<h1>kombu.compat<a class="headerlink" href="#kombu-compat" title="Permalink to this headline">¶</a></h1> +<p>Carrot compatible interface for <a class="reference internal" href="#kombu.compat.Publisher" title="kombu.compat.Publisher"><tt class="xref py py-class docutils literal"><span class="pre">Publisher</span></tt></a> and <tt class="xref py py-class docutils literal"><span class="pre">Producer</span></tt>.</p> +<p>See <a class="reference external" href="http://packages.python.org/pypi/carrot">http://packages.python.org/pypi/carrot</a> for documentation.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3"> +<li>2009 - 2010 by Ask Solem.</li> +</ol> +</td> +</tr> +<tr class="field"><th class="field-name">license:</th><td class="field-body"><p class="first last">BSD, see LICENSE for more details.</p> +</td> +</tr> +</tbody> +</table> +<div class="contents local topic" id="contents"> +<ul class="simple"> +<li><a class="reference internal" href="#publisher" id="id1">Publisher</a></li> +<li><a class="reference internal" href="#consumer" id="id2">Consumer</a></li> +<li><a class="reference internal" href="#consumerset" id="id3">ConsumerSet</a></li> +</ul> +</div> +<div class="section" id="publisher"> +<h2><a class="toc-backref" href="#id1">Publisher</a><a class="headerlink" href="#publisher" title="Permalink to this headline">¶</a></h2> +<p>Replace with <a class="reference internal" href="kombu.messaging.html#kombu.messaging.Producer" title="kombu.messaging.Producer"><tt class="xref py py-class docutils literal"><span class="pre">kombu.messaging.Producer</span></tt></a>.</p> +<dl class="class"> +<dt id="kombu.compat.Publisher"> +<em class="property">class </em><tt class="descclassname">kombu.compat.</tt><tt class="descname">Publisher</tt><big>(</big><em>connection</em>, <em>exchange=None</em>, <em>routing_key=None</em>, <em>exchange_type=None</em>, <em>durable=None</em>, <em>auto_delete=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.compat.Publisher" title="Permalink to this definition">¶</a></dt> +<dd><dl class="method"> +<dt id="kombu.compat.Publisher.close"> +<tt class="descname">close</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.compat.Publisher.close" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="kombu.compat.Publisher.declare"> +<tt class="descname">declare</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.compat.Publisher.declare" title="Permalink to this definition">¶</a></dt> +<dd><p>Declare the exchange.</p> +<p>This is done automatically at instantiation if <tt class="xref py py-attr docutils literal"><span class="pre">auto_declare</span></tt> +is set to <tt class="xref py py-const xref docutils literal"><span class="pre">True</span></tt>.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.Publisher.publish"> +<tt class="descname">publish</tt><big>(</big><em>body</em>, <em>routing_key=None</em>, <em>delivery_mode=None</em>, <em>mandatory=False</em>, <em>immediate=False</em>, <em>priority=0</em>, <em>content_type=None</em>, <em>content_encoding=None</em>, <em>serializer=None</em>, <em>headers=None</em>, <em>compression=None</em>, <em>exchange=None</em><big>)</big><a class="headerlink" href="#kombu.compat.Publisher.publish" title="Permalink to this definition">¶</a></dt> +<dd><p>Publish message to the specified exchange.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>body</strong> – Message body.</li> +<li><strong>routing_key</strong> – Message routing key.</li> +<li><strong>delivery_mode</strong> – See <tt class="xref py py-attr docutils literal"><span class="pre">delivery_mode</span></tt>.</li> +<li><strong>mandatory</strong> – Currently not supported.</li> +<li><strong>immediate</strong> – Currently not supported.</li> +<li><strong>priority</strong> – Message priority. A number between 0 and 9.</li> +<li><strong>content_type</strong> – Content type. Default is autodetect.</li> +<li><strong>content_encoding</strong> – Content encoding. Default is autodetect.</li> +<li><strong>serializer</strong> – Serializer to use. Default is autodetect.</li> +<li><strong>headers</strong> – Mapping of arbitrary headers to pass along +with the message body.</li> +<li><strong>exchange</strong> – Override the exchange. Note that this exchange +must have been declared.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.Publisher.revive"> +<tt class="descname">revive</tt><big>(</big><em>channel</em><big>)</big><a class="headerlink" href="#kombu.compat.Publisher.revive" title="Permalink to this definition">¶</a></dt> +<dd><p>Revive the producer after connection loss.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.Publisher.send"> +<tt class="descname">send</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.compat.Publisher.send" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +</div> +<div class="section" id="consumer"> +<h2><a class="toc-backref" href="#id2">Consumer</a><a class="headerlink" href="#consumer" title="Permalink to this headline">¶</a></h2> +<p>Replace with <a class="reference internal" href="kombu.messaging.html#kombu.messaging.Consumer" title="kombu.messaging.Consumer"><tt class="xref py py-class docutils literal"><span class="pre">kombu.messaging.Consumer</span></tt></a>.</p> +<dl class="class"> <dt id="kombu.compat.Consumer"> <em class="property">class </em><tt class="descclassname">kombu.compat.</tt><tt class="descname">Consumer</tt><big>(</big><em>connection</em>, <em>queue=None</em>, <em>exchange=None</em>, <em>routing_key=None</em>, <em>exchange_type=None</em>, <em>durable=None</em>, <em>exclusive=None</em>, <em>auto_delete=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.compat.Consumer" title="Permalink to this definition">¶</a></dt> <dd><dl class="method"> +<dt id="kombu.compat.Consumer.cancel"> +<tt class="descname">cancel</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.compat.Consumer.cancel" title="Permalink to this definition">¶</a></dt> +<dd><p>End all active queue consumers.</p> +<p>This does not affect already delivered messages, but it does +mean the server will not send any more messages for this consumer.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.Consumer.cancel_by_queue"> +<tt class="descname">cancel_by_queue</tt><big>(</big><em>queue</em><big>)</big><a class="headerlink" href="#kombu.compat.Consumer.cancel_by_queue" title="Permalink to this definition">¶</a></dt> +<dd><p>Cancel consumer by queue name.</p> +</dd></dl> + +<dl class="method"> <dt id="kombu.compat.Consumer.close"> <tt class="descname">close</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.compat.Consumer.close" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="method"> +<dt id="kombu.compat.Consumer.consume"> +<tt class="descname">consume</tt><big>(</big><em>no_ack=None</em><big>)</big><a class="headerlink" href="#kombu.compat.Consumer.consume" title="Permalink to this definition">¶</a></dt> +<dd><p>Register consumer on server.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.Consumer.declare"> +<tt class="descname">declare</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.compat.Consumer.declare" title="Permalink to this definition">¶</a></dt> +<dd><p>Declare queues, exchanges and bindings.</p> +<p>This is done automatically at instantiation if <tt class="xref py py-attr docutils literal"><span class="pre">auto_declare</span></tt> +is set.</p> +</dd></dl> + +<dl class="method"> <dt id="kombu.compat.Consumer.discard_all"> <tt class="descname">discard_all</tt><big>(</big><em>filterfunc=None</em><big>)</big><a class="headerlink" href="#kombu.compat.Consumer.discard_all" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> @@ -73,6 +189,18 @@ <dd></dd></dl> <dl class="method"> +<dt id="kombu.compat.Consumer.flow"> +<tt class="descname">flow</tt><big>(</big><em>active</em><big>)</big><a class="headerlink" href="#kombu.compat.Consumer.flow" title="Permalink to this definition">¶</a></dt> +<dd><p>Enable/disable flow from peer.</p> +<p>This is a simple flow-control mechanism that a peer can use +to avoid overflowing its queues or otherwise finding itself +receiving more messages than it can process.</p> +<p>The peer that receives a request to stop sending content +will finish sending the current content (if any), and then wait +until flow is reactivated.</p> +</dd></dl> + +<dl class="method"> <dt id="kombu.compat.Consumer.iterconsume"> <tt class="descname">iterconsume</tt><big>(</big><em>limit=None</em>, <em>no_ack=None</em><big>)</big><a class="headerlink" href="#kombu.compat.Consumer.iterconsume" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> @@ -88,42 +216,299 @@ <dd></dd></dl> <dl class="method"> +<dt id="kombu.compat.Consumer.purge"> +<tt class="descname">purge</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.compat.Consumer.purge" title="Permalink to this definition">¶</a></dt> +<dd><p>Purge messages from all queues.</p> +<div class="admonition warning"> +<p class="first admonition-title">Warning</p> +<p class="last">This will <em>delete all ready messages</em>, there is no +undo operation available.</p> +</div> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.Consumer.qos"> +<tt class="descname">qos</tt><big>(</big><em>prefetch_size=0</em>, <em>prefetch_count=0</em>, <em>apply_global=False</em><big>)</big><a class="headerlink" href="#kombu.compat.Consumer.qos" title="Permalink to this definition">¶</a></dt> +<dd><p>Specify quality of service.</p> +<p>The client can request that messages should be sent in +advance so that when the client finishes processing a message, +the following message is already held locally, rather than needing +to be sent down the channel. Prefetching gives a performance +improvement.</p> +<p>The prefetch window is Ignored if the <tt class="xref py py-attr docutils literal"><span class="pre">no_ack</span></tt> option is set.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>prefetch_size</strong> – Specify the prefetch window in octets. +The server will send a message in advance if it is equal to +or smaller in size than the available prefetch size (and +also falls within other prefetch limits). May be set to zero, +meaning “no specific limit”, although other prefetch limits +may still apply.</li> +<li><strong>prefetch_count</strong> – Specify the prefetch window in terms of +whole messages.</li> +<li><strong>apply_global</strong> – Apply new settings globally on all channels. +Currently not supported by RabbitMQ.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.Consumer.receive"> +<tt class="descname">receive</tt><big>(</big><em>body</em>, <em>message</em><big>)</big><a class="headerlink" href="#kombu.compat.Consumer.receive" title="Permalink to this definition">¶</a></dt> +<dd><p>Method called when a message is received.</p> +<p>This dispatches to the registered <tt class="xref py py-attr docutils literal"><span class="pre">callbacks</span></tt>.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>body</strong> – The decoded message body.</li> +<li><strong>message</strong> – The <cite>Message</cite> instance.</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name" colspan="2">Raises NotImplementedError:</th></tr> +<tr><td> </td><td class="field-body"><p class="first last">If no consumer callbacks have been +registered.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.Consumer.recover"> +<tt class="descname">recover</tt><big>(</big><em>requeue=False</em><big>)</big><a class="headerlink" href="#kombu.compat.Consumer.recover" title="Permalink to this definition">¶</a></dt> +<dd><p>Redeliver unacknowledged messages.</p> +<p>Asks the broker to redeliver all unacknowledged messages +on the specified channel.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>requeue</strong> – By default the messages will be redelivered +to the original recipient. With <cite>requeue</cite> set to true, the +server will attempt to requeue the message, potentially then +delivering it to an alternative subscriber.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.Consumer.register_callback"> +<tt class="descname">register_callback</tt><big>(</big><em>callback</em><big>)</big><a class="headerlink" href="#kombu.compat.Consumer.register_callback" title="Permalink to this definition">¶</a></dt> +<dd><p>Register a new callback to be called when a message +is received.</p> +<p>The signature of the callback needs to accept two arguments: +<cite>(body, message)</cite>, which is the decoded message body +and the <cite>Message</cite> instance (a subclass of +<a class="reference internal" href="kombu.transport.base.html#kombu.transport.base.Message" title="kombu.transport.base.Message"><tt class="xref py py-class docutils literal"><span class="pre">Message</span></tt></a>.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.Consumer.revive"> +<tt class="descname">revive</tt><big>(</big><em>channel</em><big>)</big><a class="headerlink" href="#kombu.compat.Consumer.revive" title="Permalink to this definition">¶</a></dt> +<dd><p>Revive consumer after connection loss.</p> +</dd></dl> + +<dl class="method"> <dt id="kombu.compat.Consumer.wait"> <tt class="descname">wait</tt><big>(</big><em>limit=None</em><big>)</big><a class="headerlink" href="#kombu.compat.Consumer.wait" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </dd></dl> -<dl class="function"> +</div> +<div class="section" id="consumerset"> +<h2><a class="toc-backref" href="#id3">ConsumerSet</a><a class="headerlink" href="#consumerset" title="Permalink to this headline">¶</a></h2> +<p>Replace with <a class="reference internal" href="kombu.messaging.html#kombu.messaging.Consumer" title="kombu.messaging.Consumer"><tt class="xref py py-class docutils literal"><span class="pre">kombu.messaging.Consumer</span></tt></a>.</p> +<dl class="class"> <dt id="kombu.compat.ConsumerSet"> -<tt class="descclassname">kombu.compat.</tt><tt class="descname">ConsumerSet</tt><big>(</big><em>connection</em>, <em>from_dict=None</em>, <em>consumers=None</em>, <em>callbacks=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.compat.ConsumerSet" title="Permalink to this definition">¶</a></dt> +<em class="property">class </em><tt class="descclassname">kombu.compat.</tt><tt class="descname">ConsumerSet</tt><big>(</big><em>connection</em>, <em>from_dict=None</em>, <em>consumers=None</em>, <em>callbacks=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.compat.ConsumerSet" title="Permalink to this definition">¶</a></dt> +<dd><dl class="method"> +<dt id="kombu.compat.ConsumerSet.add_consumer"> +<tt class="descname">add_consumer</tt><big>(</big><em>consumer</em><big>)</big><a class="headerlink" href="#kombu.compat.ConsumerSet.add_consumer" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> -<dl class="class"> -<dt id="kombu.compat.Publisher"> -<em class="property">class </em><tt class="descclassname">kombu.compat.</tt><tt class="descname">Publisher</tt><big>(</big><em>connection</em>, <em>exchange=None</em>, <em>routing_key=None</em>, <em>exchange_type=None</em>, <em>durable=None</em>, <em>auto_delete=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.compat.Publisher" title="Permalink to this definition">¶</a></dt> -<dd><dl class="method"> -<dt id="kombu.compat.Publisher.close"> -<tt class="descname">close</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.compat.Publisher.close" title="Permalink to this definition">¶</a></dt> +<dl class="method"> +<dt id="kombu.compat.ConsumerSet.add_consumer_from_dict"> +<tt class="descname">add_consumer_from_dict</tt><big>(</big><em>queue</em>, <em>**options</em><big>)</big><a class="headerlink" href="#kombu.compat.ConsumerSet.add_consumer_from_dict" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="method"> -<dt id="kombu.compat.Publisher.send"> -<tt class="descname">send</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.compat.Publisher.send" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.compat.ConsumerSet.cancel"> +<tt class="descname">cancel</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.compat.ConsumerSet.cancel" title="Permalink to this definition">¶</a></dt> +<dd><p>End all active queue consumers.</p> +<p>This does not affect already delivered messages, but it does +mean the server will not send any more messages for this consumer.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.ConsumerSet.cancel_by_queue"> +<tt class="descname">cancel_by_queue</tt><big>(</big><em>queue</em><big>)</big><a class="headerlink" href="#kombu.compat.ConsumerSet.cancel_by_queue" title="Permalink to this definition">¶</a></dt> +<dd><p>Cancel consumer by queue name.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.ConsumerSet.close"> +<tt class="descname">close</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.compat.ConsumerSet.close" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> +<dl class="method"> +<dt id="kombu.compat.ConsumerSet.consume"> +<tt class="descname">consume</tt><big>(</big><em>no_ack=None</em><big>)</big><a class="headerlink" href="#kombu.compat.ConsumerSet.consume" title="Permalink to this definition">¶</a></dt> +<dd><p>Register consumer on server.</p> </dd></dl> -<dl class="function"> -<dt id="kombu.compat.entry_to_queue"> -<tt class="descclassname">kombu.compat.</tt><tt class="descname">entry_to_queue</tt><big>(</big><em>queue</em>, <em>**options</em><big>)</big><a class="headerlink" href="#kombu.compat.entry_to_queue" title="Permalink to this definition">¶</a></dt> +<dl class="method"> +<dt id="kombu.compat.ConsumerSet.declare"> +<tt class="descname">declare</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.compat.ConsumerSet.declare" title="Permalink to this definition">¶</a></dt> +<dd><p>Declare queues, exchanges and bindings.</p> +<p>This is done automatically at instantiation if <tt class="xref py py-attr docutils literal"><span class="pre">auto_declare</span></tt> +is set.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.ConsumerSet.discard_all"> +<tt class="descname">discard_all</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.compat.ConsumerSet.discard_all" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> -<dl class="function"> -<dt id="kombu.compat.iterconsume"> -<tt class="descclassname">kombu.compat.</tt><tt class="descname">iterconsume</tt><big>(</big><em>connection</em>, <em>consumer</em>, <em>no_ack=False</em>, <em>limit=None</em><big>)</big><a class="headerlink" href="#kombu.compat.iterconsume" title="Permalink to this definition">¶</a></dt> +<dl class="method"> +<dt id="kombu.compat.ConsumerSet.flow"> +<tt class="descname">flow</tt><big>(</big><em>active</em><big>)</big><a class="headerlink" href="#kombu.compat.ConsumerSet.flow" title="Permalink to this definition">¶</a></dt> +<dd><p>Enable/disable flow from peer.</p> +<p>This is a simple flow-control mechanism that a peer can use +to avoid overflowing its queues or otherwise finding itself +receiving more messages than it can process.</p> +<p>The peer that receives a request to stop sending content +will finish sending the current content (if any), and then wait +until flow is reactivated.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.ConsumerSet.iterconsume"> +<tt class="descname">iterconsume</tt><big>(</big><em>limit=None</em>, <em>no_ack=False</em><big>)</big><a class="headerlink" href="#kombu.compat.ConsumerSet.iterconsume" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> +<dl class="method"> +<dt id="kombu.compat.ConsumerSet.purge"> +<tt class="descname">purge</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.compat.ConsumerSet.purge" title="Permalink to this definition">¶</a></dt> +<dd><p>Purge messages from all queues.</p> +<div class="admonition warning"> +<p class="first admonition-title">Warning</p> +<p class="last">This will <em>delete all ready messages</em>, there is no +undo operation available.</p> +</div> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.ConsumerSet.qos"> +<tt class="descname">qos</tt><big>(</big><em>prefetch_size=0</em>, <em>prefetch_count=0</em>, <em>apply_global=False</em><big>)</big><a class="headerlink" href="#kombu.compat.ConsumerSet.qos" title="Permalink to this definition">¶</a></dt> +<dd><p>Specify quality of service.</p> +<p>The client can request that messages should be sent in +advance so that when the client finishes processing a message, +the following message is already held locally, rather than needing +to be sent down the channel. Prefetching gives a performance +improvement.</p> +<p>The prefetch window is Ignored if the <tt class="xref py py-attr docutils literal"><span class="pre">no_ack</span></tt> option is set.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>prefetch_size</strong> – Specify the prefetch window in octets. +The server will send a message in advance if it is equal to +or smaller in size than the available prefetch size (and +also falls within other prefetch limits). May be set to zero, +meaning “no specific limit”, although other prefetch limits +may still apply.</li> +<li><strong>prefetch_count</strong> – Specify the prefetch window in terms of +whole messages.</li> +<li><strong>apply_global</strong> – Apply new settings globally on all channels. +Currently not supported by RabbitMQ.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.ConsumerSet.receive"> +<tt class="descname">receive</tt><big>(</big><em>body</em>, <em>message</em><big>)</big><a class="headerlink" href="#kombu.compat.ConsumerSet.receive" title="Permalink to this definition">¶</a></dt> +<dd><p>Method called when a message is received.</p> +<p>This dispatches to the registered <tt class="xref py py-attr docutils literal"><span class="pre">callbacks</span></tt>.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>body</strong> – The decoded message body.</li> +<li><strong>message</strong> – The <cite>Message</cite> instance.</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name" colspan="2">Raises NotImplementedError:</th></tr> +<tr><td> </td><td class="field-body"><p class="first last">If no consumer callbacks have been +registered.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.ConsumerSet.recover"> +<tt class="descname">recover</tt><big>(</big><em>requeue=False</em><big>)</big><a class="headerlink" href="#kombu.compat.ConsumerSet.recover" title="Permalink to this definition">¶</a></dt> +<dd><p>Redeliver unacknowledged messages.</p> +<p>Asks the broker to redeliver all unacknowledged messages +on the specified channel.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>requeue</strong> – By default the messages will be redelivered +to the original recipient. With <cite>requeue</cite> set to true, the +server will attempt to requeue the message, potentially then +delivering it to an alternative subscriber.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.ConsumerSet.register_callback"> +<tt class="descname">register_callback</tt><big>(</big><em>callback</em><big>)</big><a class="headerlink" href="#kombu.compat.ConsumerSet.register_callback" title="Permalink to this definition">¶</a></dt> +<dd><p>Register a new callback to be called when a message +is received.</p> +<p>The signature of the callback needs to accept two arguments: +<cite>(body, message)</cite>, which is the decoded message body +and the <cite>Message</cite> instance (a subclass of +<a class="reference internal" href="kombu.transport.base.html#kombu.transport.base.Message" title="kombu.transport.base.Message"><tt class="xref py py-class docutils literal"><span class="pre">Message</span></tt></a>.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.compat.ConsumerSet.revive"> +<tt class="descname">revive</tt><big>(</big><em>channel</em><big>)</big><a class="headerlink" href="#kombu.compat.ConsumerSet.revive" title="Permalink to this definition">¶</a></dt> +<dd><p>Revive consumer after connection loss.</p> +</dd></dl> + +</dd></dl> + +</div> </div> @@ -134,12 +519,22 @@ <div class="sphinxsidebarwrapper"><p class="logo"><a href="../index.html"> <img class="logo" width="128" height="128" src="http://cloud.github.com/downloads/ask/kombu/kombusmall.jpg" alt="Logo"/> </a></p> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">kombu.compat</a><ul> +<li><a class="reference internal" href="#publisher">Publisher</a></li> +<li><a class="reference internal" href="#consumer">Consumer</a></li> +<li><a class="reference internal" href="#consumerset">ConsumerSet</a></li> +</ul> +</li> +</ul> + <h4>Previous topic</h4> <p class="topless"><a href="kombu.entity.html" - title="previous chapter">AMQP Entities - kombu.entity</a></p> + title="previous chapter">kombu.entity</a></p> <h4>Next topic</h4> <p class="topless"><a href="kombu.pidbox.html" - title="next chapter">Process Mailbox - kombu.pidbox</a></p> + title="next chapter">kombu.pidbox</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../sources/reference/kombu.compat.txt" @@ -172,18 +567,18 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.pidbox.html" title="Process Mailbox - kombu.pidbox" + <a href="kombu.pidbox.html" title="kombu.pidbox" >next</a> |</li> <li class="right" > - <a href="kombu.entity.html" title="AMQP Entities - kombu.entity" + <a href="kombu.entity.html" title="kombu.entity" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.compression.html b/reference/kombu.compression.html index fce8feff..2ead1279 100644 --- a/reference/kombu.compression.html +++ b/reference/kombu.compression.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Compression - kombu.compression — Kombu v0.9.0 documentation</title> + <title>kombu.compression — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,10 +21,10 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> - <link rel="next" title="Object Utilities - kombu.abstract" href="kombu.abstract.html" /> - <link rel="prev" title="Serialization - kombu.serialization" href="kombu.serialization.html" /> + <link rel="next" title="kombu.compression" href="kombu.abstract.html" /> + <link rel="prev" title="kombu.serialization" href="kombu.serialization.html" /> </head> <body> <div class="related"> @@ -37,12 +37,12 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.abstract.html" title="Object Utilities - kombu.abstract" + <a href="kombu.abstract.html" title="kombu.compression" accesskey="N">next</a> |</li> <li class="right" > - <a href="kombu.serialization.html" title="Serialization - kombu.serialization" + <a href="kombu.serialization.html" title="kombu.serialization" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -52,34 +52,110 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="compression-kombu-compression"> -<h1>Compression - kombu.compression<a class="headerlink" href="#compression-kombu-compression" title="Permalink to this headline">¶</a></h1> -<span class="target" id="module-kombu.compression"></span><dl class="function"> + <span class="target" id="module-kombu.compression"></span><div class="section" id="kombu-compression"> +<h1>kombu.compression<a class="headerlink" href="#kombu-compression" title="Permalink to this headline">¶</a></h1> +<p>Compression utilities.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3"> +<li>2009 - 2010 by Ask Solem.</li> +</ol> +</td> +</tr> +<tr class="field"><th class="field-name">license:</th><td class="field-body"><p class="first last">BSD, see LICENSE for more details.</p> +</td> +</tr> +</tbody> +</table> +<div class="contents local topic" id="contents"> +<ul class="simple"> +<li><a class="reference internal" href="#encoding-decoding" id="id1">Encoding/decoding</a></li> +<li><a class="reference internal" href="#registry" id="id2">Registry</a></li> +</ul> +</div> +<div class="section" id="encoding-decoding"> +<h2><a class="toc-backref" href="#id1">Encoding/decoding</a><a class="headerlink" href="#encoding-decoding" title="Permalink to this headline">¶</a></h2> +<dl class="function"> <dt id="kombu.compression.compress"> <tt class="descclassname">kombu.compression.</tt><tt class="descname">compress</tt><big>(</big><em>body</em>, <em>content_type</em><big>)</big><a class="headerlink" href="#kombu.compression.compress" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dd><p>Compress text.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>body</strong> – The text to compress.</li> +<li><strong>content_type</strong> – mime-type of compression method to use.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> <dl class="function"> <dt id="kombu.compression.decompress"> <tt class="descclassname">kombu.compression.</tt><tt class="descname">decompress</tt><big>(</big><em>body</em>, <em>content_type</em><big>)</big><a class="headerlink" href="#kombu.compression.decompress" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dd><p>Decompress compressed text.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>body</strong> – Previously compressed text to uncompress.</li> +<li><strong>content_type</strong> – mime-type of compression method used.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> +</div> +<div class="section" id="registry"> +<h2><a class="toc-backref" href="#id2">Registry</a><a class="headerlink" href="#registry" title="Permalink to this headline">¶</a></h2> <dl class="function"> -<dt id="kombu.compression.get_decoder"> -<tt class="descclassname">kombu.compression.</tt><tt class="descname">get_decoder</tt><big>(</big><em>t</em><big>)</big><a class="headerlink" href="#kombu.compression.get_decoder" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.compression.encoders"> +<tt class="descclassname">kombu.compression.</tt><tt class="descname">encoders</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.compression.encoders" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns a list of available compression methods.</p> +</dd></dl> <dl class="function"> <dt id="kombu.compression.get_encoder"> <tt class="descclassname">kombu.compression.</tt><tt class="descname">get_encoder</tt><big>(</big><em>t</em><big>)</big><a class="headerlink" href="#kombu.compression.get_encoder" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dd><p>Get encoder by alias name.</p> +</dd></dl> + +<dl class="function"> +<dt id="kombu.compression.get_decoder"> +<tt class="descclassname">kombu.compression.</tt><tt class="descname">get_decoder</tt><big>(</big><em>t</em><big>)</big><a class="headerlink" href="#kombu.compression.get_decoder" title="Permalink to this definition">¶</a></dt> +<dd><p>Get decoder by alias name.</p> +</dd></dl> <dl class="function"> <dt id="kombu.compression.register"> <tt class="descclassname">kombu.compression.</tt><tt class="descname">register</tt><big>(</big><em>encoder</em>, <em>decoder</em>, <em>content_type</em>, <em>aliases=</em><span class="optional">[</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#kombu.compression.register" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dd><p>Register new compression method.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>encoder</strong> – Function used to compress text.</li> +<li><strong>decoder</strong> – Function used to decompress previously compressed text.</li> +<li><strong>content_type</strong> – The mime type this compression method identifies as.</li> +<li><strong>aliases</strong> – A list of names to associate with this compression method.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> </div> +</div> </div> @@ -89,12 +165,21 @@ <div class="sphinxsidebarwrapper"><p class="logo"><a href="../index.html"> <img class="logo" width="128" height="128" src="http://cloud.github.com/downloads/ask/kombu/kombusmall.jpg" alt="Logo"/> </a></p> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">kombu.compression</a><ul> +<li><a class="reference internal" href="#encoding-decoding">Encoding/decoding</a></li> +<li><a class="reference internal" href="#registry">Registry</a></li> +</ul> +</li> +</ul> + <h4>Previous topic</h4> <p class="topless"><a href="kombu.serialization.html" - title="previous chapter">Serialization - kombu.serialization</a></p> + title="previous chapter">kombu.serialization</a></p> <h4>Next topic</h4> <p class="topless"><a href="kombu.abstract.html" - title="next chapter">Object Utilities - kombu.abstract</a></p> + title="next chapter">kombu.compression</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../sources/reference/kombu.compression.txt" @@ -127,18 +212,18 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.abstract.html" title="Object Utilities - kombu.abstract" + <a href="kombu.abstract.html" title="kombu.compression" >next</a> |</li> <li class="right" > - <a href="kombu.serialization.html" title="Serialization - kombu.serialization" + <a href="kombu.serialization.html" title="kombu.serialization" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.connection.html b/reference/kombu.connection.html index 19640e25..b4fa3caa 100644 --- a/reference/kombu.connection.html +++ b/reference/kombu.connection.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Broker Connections - kombu.connection — Kombu v0.9.0 documentation</title> + <title>kombu.connection — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,9 +21,9 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> - <link rel="next" title="Simple Interface - kombu.simple" href="kombu.simple.html" /> + <link rel="next" title="kombu.simple" href="kombu.simple.html" /> <link rel="prev" title="API Reference" href="index.html" /> </head> <body> @@ -37,12 +37,12 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.simple.html" title="Simple Interface - kombu.simple" + <a href="kombu.simple.html" title="kombu.simple" accesskey="N">next</a> |</li> <li class="right" > <a href="index.html" title="API Reference" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -52,9 +52,32 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="broker-connections-kombu-connection"> -<h1>Broker Connections - kombu.connection<a class="headerlink" href="#broker-connections-kombu-connection" title="Permalink to this headline">¶</a></h1> -<span class="target" id="module-kombu.connection"></span><dl class="class"> + <span class="target" id="module-kombu.connection"></span><div class="section" id="kombu-connection"> +<h1>kombu.connection<a class="headerlink" href="#kombu-connection" title="Permalink to this headline">¶</a></h1> +<p>Broker connection and pools.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3"> +<li>2009 - 2010 by Ask Solem.</li> +</ol> +</td> +</tr> +<tr class="field"><th class="field-name">license:</th><td class="field-body"><p class="first last">BSD, see LICENSE for more details.</p> +</td> +</tr> +</tbody> +</table> +<div class="contents local topic" id="contents"> +<ul class="simple"> +<li><a class="reference internal" href="#connection" id="id1">Connection</a></li> +<li><a class="reference internal" href="#pools" id="id2">Pools</a></li> +</ul> +</div> +<div class="section" id="connection"> +<h2><a class="toc-backref" href="#id1">Connection</a><a class="headerlink" href="#connection" title="Permalink to this headline">¶</a></h2> +<dl class="class"> <dt id="kombu.connection.BrokerConnection"> <em class="property">class </em><tt class="descclassname">kombu.connection.</tt><tt class="descname">BrokerConnection</tt><big>(</big><em>hostname='localhost'</em>, <em>userid='guest'</em>, <em>password='guest'</em>, <em>virtual_host='/'</em>, <em>port=None</em>, <em>insist=False</em>, <em>ssl=False</em>, <em>transport=None</em>, <em>connect_timeout=5</em>, <em>backend_cls=None</em><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection" title="Permalink to this definition">¶</a></dt> <dd><p>A connection to the broker.</p> @@ -91,7 +114,8 @@ server. May not be suported by the specified transport.</li> </pre></div> </div> <p>The connection is established lazily when needed. If you need the -connection to be established, then do so expliclty using <a class="reference internal" href="#kombu.connection.BrokerConnection.connect" title="kombu.connection.BrokerConnection.connect"><tt class="xref py py-meth docutils literal"><span class="pre">connect()</span></tt></a>:</p> +connection to be established, then force it to do so using +<a class="reference internal" href="#kombu.connection.BrokerConnection.connect" title="kombu.connection.BrokerConnection.connect"><tt class="xref py py-meth docutils literal"><span class="pre">connect()</span></tt></a>:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">conn</span><span class="o">.</span><span class="n">connect</span><span class="p">()</span> </pre></div> </div> @@ -99,53 +123,11 @@ connection to be established, then do so expliclty using <a class="reference int <div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">conn</span><span class="o">.</span><span class="n">release</span><span class="p">()</span> </pre></div> </div> -<dl class="method"> -<dt id="kombu.connection.BrokerConnection.SimpleBuffer"> -<tt class="descname">SimpleBuffer</tt><big>(</big><em>name</em>, <em>no_ack=False</em>, <em>queue_opts=None</em>, <em>exchange_opts=None</em>, <em>channel=None</em><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.SimpleBuffer" title="Permalink to this definition">¶</a></dt> -<dd><p>Create new <a class="reference internal" href="kombu.simple.html#kombu.simple.SimpleQueue" title="kombu.simple.SimpleQueue"><tt class="xref py py-class docutils literal"><span class="pre">SimpleQueue</span></tt></a> using a channel -from this connection.</p> -<p>Same as <a class="reference internal" href="#kombu.connection.BrokerConnection.SimpleQueue" title="kombu.connection.BrokerConnection.SimpleQueue"><tt class="xref py py-meth docutils literal"><span class="pre">SimpleQueue()</span></tt></a>, but configured with buffering -semantics. The resulting queue and exchange will not be durable, also -auto delete is enabled. Messages will be transient (not persistent), -and acknowledgements are disabled (<tt class="docutils literal"><span class="pre">no_ack</span></tt>).</p> -</dd></dl> - -<dl class="method"> -<dt id="kombu.connection.BrokerConnection.SimpleQueue"> -<tt class="descname">SimpleQueue</tt><big>(</big><em>name</em>, <em>no_ack=False</em>, <em>queue_opts=None</em>, <em>exchange_opts=None</em>, <em>channel=None</em><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.SimpleQueue" title="Permalink to this definition">¶</a></dt> -<dd><p>Create new <a class="reference internal" href="kombu.simple.html#kombu.simple.SimpleQueue" title="kombu.simple.SimpleQueue"><tt class="xref py py-class docutils literal"><span class="pre">SimpleQueue</span></tt></a>, using a channel -from this connection.</p> -<p>If <tt class="docutils literal"><span class="pre">name</span></tt> is a string, a queue and exchange will be automatically -created using that name as the name of the queue and exchange, -also it will be used as the default routing key.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> -<li><strong>name</strong> – Name of the queue/or a <a class="reference internal" href="kombu.entity.html#kombu.entity.Queue" title="kombu.entity.Queue"><tt class="xref py py-class docutils literal"><span class="pre">Queue</span></tt></a>.</li> -<li><strong>no_ack</strong> – Disable acknowledgements. Default is false.</li> -<li><strong>queue_opts</strong> – Additional keyword arguments passed to the -constructor of the automatically created -<a class="reference internal" href="kombu.entity.html#kombu.entity.Queue" title="kombu.entity.Queue"><tt class="xref py py-class docutils literal"><span class="pre">Queue</span></tt></a>.</li> -<li><strong>exchange_opts</strong> – Additional keyword arguments passed to the -constructor of the automatically created -<a class="reference internal" href="kombu.entity.html#kombu.entity.Exchange" title="kombu.entity.Exchange"><tt class="xref py py-class docutils literal"><span class="pre">Exchange</span></tt></a>.</li> -<li><strong>channel</strong> – Channel to use. If not specified a new channel -from the current connection will be used. Remember to call -<tt class="xref py py-meth docutils literal"><span class="pre">close()</span></tt> when done with the -object.</li> -</ul> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> -<dt id="kombu.connection.BrokerConnection.channel"> -<tt class="descname">channel</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.channel" title="Permalink to this definition">¶</a></dt> -<dd><p>Request a new channel.</p> +<p><strong>ATTRIBUTES</strong></p> +<dl class="attribute"> +<dt id="kombu.connection.BrokerConnection.connection_errors"> +<tt class="descname">connection_errors</tt><a class="headerlink" href="#kombu.connection.BrokerConnection.connection_errors" title="Permalink to this definition">¶</a></dt> +<dd><p>List of exceptions that may be raised by the connection.</p> </dd></dl> <dl class="attribute"> @@ -154,45 +136,40 @@ object.</li> <dd><p>List of exceptions that may be raised by the channel.</p> </dd></dl> -<dl class="method"> -<dt id="kombu.connection.BrokerConnection.clone"> -<tt class="descname">clone</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.clone" title="Permalink to this definition">¶</a></dt> -<dd><p>Create a copy of the connection with the same connection -settings.</p> -</dd></dl> - -<dl class="method"> -<dt id="kombu.connection.BrokerConnection.close"> -<tt class="descname">close</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.close" title="Permalink to this definition">¶</a></dt> -<dd><p>Close the connection (if open).</p> -</dd></dl> +<dl class="attribute"> +<dt id="kombu.connection.BrokerConnection.transport"> +<tt class="descname">transport</tt><a class="headerlink" href="#kombu.connection.BrokerConnection.transport" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> -<dl class="method"> -<dt id="kombu.connection.BrokerConnection.connect"> -<tt class="descname">connect</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.connect" title="Permalink to this definition">¶</a></dt> -<dd><p>Establish connection to server immediately.</p> +<dl class="attribute"> +<dt id="kombu.connection.BrokerConnection.host"> +<tt class="descname">host</tt><a class="headerlink" href="#kombu.connection.BrokerConnection.host" title="Permalink to this definition">¶</a></dt> +<dd><p>The host as a hostname/port pair separated by colon.</p> </dd></dl> <dl class="attribute"> <dt id="kombu.connection.BrokerConnection.connection"> <tt class="descname">connection</tt><a class="headerlink" href="#kombu.connection.BrokerConnection.connection" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -<dl class="attribute"> -<dt id="kombu.connection.BrokerConnection.connection_errors"> -<tt class="descname">connection_errors</tt><a class="headerlink" href="#kombu.connection.BrokerConnection.connection_errors" title="Permalink to this definition">¶</a></dt> -<dd><p>List of exceptions that may be raised by the connection.</p> +<dd><p>The underlying connection object.</p> +<div class="admonition warning"> +<p class="first admonition-title">Warning</p> +<p class="last">This instance is transport specific, so do not +depend on the interface of this object.</p> +</div> </dd></dl> +<p><strong>METHODS</strong></p> <dl class="method"> -<dt id="kombu.connection.BrokerConnection.create_backend"> -<tt class="descname">create_backend</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.create_backend" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.connection.BrokerConnection.connect"> +<tt class="descname">connect</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.connect" title="Permalink to this definition">¶</a></dt> +<dd><p>Establish connection to server immediately.</p> +</dd></dl> <dl class="method"> -<dt id="kombu.connection.BrokerConnection.create_transport"> -<tt class="descname">create_transport</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.create_transport" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.connection.BrokerConnection.channel"> +<tt class="descname">channel</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.channel" title="Permalink to this definition">¶</a></dt> +<dd><p>Request a new channel.</p> +</dd></dl> <dl class="method"> <dt id="kombu.connection.BrokerConnection.drain_events"> @@ -214,18 +191,22 @@ Raises <tt class="xref py py-exc docutils literal"><span class="pre">socket.time </dd></dl> <dl class="method"> -<dt id="kombu.connection.BrokerConnection.ensure"> -<tt class="descname">ensure</tt><big>(</big><em>fun</em>, <em>errback=None</em>, <em>max_retries=None</em>, <em>interval_start=1</em>, <em>interval_step=1</em>, <em>interval_max=1</em><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.ensure" title="Permalink to this definition">¶</a></dt> -<dd><p>Ensure operation completes, regardless of any channel/connection -errors occuring.</p> -<p>Will retry by establishing the connection, and reapplying -the function.</p> +<dt id="kombu.connection.BrokerConnection.release"> +<tt class="descname">release</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.release" title="Permalink to this definition">¶</a></dt> +<dd><p>Close the connection (if open).</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.connection.BrokerConnection.ensure_connection"> +<tt class="descname">ensure_connection</tt><big>(</big><em>errback=None</em>, <em>max_retries=None</em>, <em>interval_start=2</em>, <em>interval_step=2</em>, <em>interval_max=30</em><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.ensure_connection" title="Permalink to this definition">¶</a></dt> +<dd><p>Ensure we have a connection to the server.</p> +<p>If not retry establishing the connection with the settings +specified.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> -<li><strong>fun</strong> – Method to apply.</li> <li><strong>errback</strong> – Optional callback called each time the connection can’t be established. Arguments provided are the exception raised and the interval that will be slept <tt class="docutils literal"><span class="pre">(exc,</span> <span class="pre">interval)</span></tt>.</li> @@ -241,29 +222,21 @@ each retry.</li> </tr> </tbody> </table> -<p><strong>Example</strong></p> -<p>This is an example ensuring a publish operation:</p> -<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="k">def</span> <span class="nf">errback</span><span class="p">(</span><span class="n">exc</span><span class="p">,</span> <span class="n">interval</span><span class="p">):</span> -<span class="gp">... </span> <span class="k">print</span><span class="p">(</span><span class="s">"Couldn't publish message: </span><span class="si">%r</span><span class="s">. Retry in </span><span class="si">%d</span><span class="s">s"</span> <span class="o">%</span> <span class="p">(</span> -<span class="gp">... </span> <span class="n">exc</span><span class="p">,</span> <span class="n">interval</span><span class="p">))</span> -<span class="gp">>>> </span><span class="n">publish</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="n">ensure</span><span class="p">(</span><span class="n">producer</span><span class="o">.</span><span class="n">publish</span><span class="p">,</span> -<span class="gp">... </span> <span class="n">errback</span><span class="o">=</span><span class="n">errback</span><span class="p">,</span> <span class="n">max_retries</span><span class="o">=</span><span class="mi">3</span><span class="p">)</span> -<span class="gp">>>> </span><span class="n">publish</span><span class="p">(</span><span class="n">message</span><span class="p">,</span> <span class="n">routing_key</span><span class="p">)</span> -</pre></div> -</div> </dd></dl> <dl class="method"> -<dt id="kombu.connection.BrokerConnection.ensure_connection"> -<tt class="descname">ensure_connection</tt><big>(</big><em>errback=None</em>, <em>max_retries=None</em>, <em>interval_start=2</em>, <em>interval_step=2</em>, <em>interval_max=30</em><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.ensure_connection" title="Permalink to this definition">¶</a></dt> -<dd><p>Ensure we have a connection to the server.</p> -<p>If not retry establishing the connection with the settings -specified.</p> +<dt id="kombu.connection.BrokerConnection.ensure"> +<tt class="descname">ensure</tt><big>(</big><em>obj</em>, <em>fun</em>, <em>errback=None</em>, <em>max_retries=None</em>, <em>interval_start=1</em>, <em>interval_step=1</em>, <em>interval_max=1</em><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.ensure" title="Permalink to this definition">¶</a></dt> +<dd><p>Ensure operation completes, regardless of any channel/connection +errors occuring.</p> +<p>Will retry by establishing the connection, and reapplying +the function.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>fun</strong> – Method to apply.</li> <li><strong>errback</strong> – Optional callback called each time the connection can’t be established. Arguments provided are the exception raised and the interval that will be slept <tt class="docutils literal"><span class="pre">(exc,</span> <span class="pre">interval)</span></tt>.</li> @@ -279,18 +252,34 @@ each retry.</li> </tr> </tbody> </table> +<p><strong>Example</strong></p> +<p>This is an example ensuring a publish operation:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="k">def</span> <span class="nf">errback</span><span class="p">(</span><span class="n">exc</span><span class="p">,</span> <span class="n">interval</span><span class="p">):</span> +<span class="gp">... </span> <span class="k">print</span><span class="p">(</span><span class="s">"Couldn't publish message: </span><span class="si">%r</span><span class="s">. Retry in </span><span class="si">%d</span><span class="s">s"</span> <span class="o">%</span> <span class="p">(</span> +<span class="gp">... </span> <span class="n">exc</span><span class="p">,</span> <span class="n">interval</span><span class="p">))</span> +<span class="gp">>>> </span><span class="n">publish</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="n">ensure</span><span class="p">(</span><span class="n">producer</span><span class="p">,</span> <span class="n">producer</span><span class="o">.</span><span class="n">publish</span><span class="p">,</span> +<span class="gp">... </span> <span class="n">errback</span><span class="o">=</span><span class="n">errback</span><span class="p">,</span> <span class="n">max_retries</span><span class="o">=</span><span class="mi">3</span><span class="p">)</span> +<span class="gp">>>> </span><span class="n">publish</span><span class="p">(</span><span class="n">message</span><span class="p">,</span> <span class="n">routing_key</span><span class="p">)</span> +</pre></div> +</div> </dd></dl> <dl class="method"> +<dt id="kombu.connection.BrokerConnection.create_transport"> +<tt class="descname">create_transport</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.create_transport" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> <dt id="kombu.connection.BrokerConnection.get_transport_cls"> <tt class="descname">get_transport_cls</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.get_transport_cls" title="Permalink to this definition">¶</a></dt> <dd><p>Get the currently used transport class.</p> </dd></dl> -<dl class="attribute"> -<dt id="kombu.connection.BrokerConnection.host"> -<tt class="descname">host</tt><a class="headerlink" href="#kombu.connection.BrokerConnection.host" title="Permalink to this definition">¶</a></dt> -<dd><p>The host as a hostname/port pair separated by colon.</p> +<dl class="method"> +<dt id="kombu.connection.BrokerConnection.clone"> +<tt class="descname">clone</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.clone" title="Permalink to this definition">¶</a></dt> +<dd><p>Create a copy of the connection with the same connection +settings.</p> </dd></dl> <dl class="method"> @@ -299,14 +288,212 @@ each retry.</li> <dd><p>Get connection info.</p> </dd></dl> -<dl class="attribute"> -<dt id="kombu.connection.BrokerConnection.transport"> -<tt class="descname">transport</tt><a class="headerlink" href="#kombu.connection.BrokerConnection.transport" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dl class="method"> +<dt id="kombu.connection.BrokerConnection.Pool"> +<tt class="descname">Pool</tt><big>(</big><em>limit=None</em>, <em>preload=None</em><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.Pool" title="Permalink to this definition">¶</a></dt> +<dd><p>Pool of connections.</p> +<p>See <a class="reference internal" href="#kombu.connection.ConnectionPool" title="kombu.connection.ConnectionPool"><tt class="xref py py-class docutils literal"><span class="pre">ConnectionPool</span></tt></a>.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>limit</strong> – Maximum number of active connections. +Default is no limit.</li> +<li><strong>preload</strong> – Number of connections to preload +when the pool is created. Default is 0.</li> +</ul> +</td> +</tr> +</tbody> +</table> +<p><em>Example usage</em>:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">pool</span> <span class="o">=</span> <span class="n">connection</span><span class="o">.</span><span class="n">Pool</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> +<span class="gp">>>> </span><span class="n">c1</span> <span class="o">=</span> <span class="n">pool</span><span class="o">.</span><span class="n">acquire</span><span class="p">()</span> +<span class="gp">>>> </span><span class="n">c2</span> <span class="o">=</span> <span class="n">pool</span><span class="o">.</span><span class="n">acquire</span><span class="p">()</span> +<span class="gp">>>> </span><span class="n">c3</span> <span class="o">=</span> <span class="n">pool</span><span class="o">.</span><span class="n">acquire</span><span class="p">()</span> +<span class="gp">>>> </span><span class="n">c1</span><span class="o">.</span><span class="n">release</span><span class="p">()</span> +<span class="gp">>>> </span><span class="n">c3</span> <span class="o">=</span> <span class="n">pool</span><span class="o">.</span><span class="n">acquire</span><span class="p">()</span> +</pre></div> +</div> +</dd></dl> + +<dl class="method"> +<dt id="kombu.connection.BrokerConnection.ChannelPool"> +<tt class="descname">ChannelPool</tt><big>(</big><em>limit=None</em>, <em>preload=None</em><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.ChannelPool" title="Permalink to this definition">¶</a></dt> +<dd><p>Pool of channels.</p> +<p>See <a class="reference internal" href="#kombu.connection.ChannelPool" title="kombu.connection.ChannelPool"><tt class="xref py py-class docutils literal"><span class="pre">ChannelPool</span></tt></a>.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>limit</strong> – Maximum number of active channels. +Default is no limit.</li> +<li><strong>preload</strong> – Number of channels to preload +when the pool is created. Default is 0.</li> +</ul> +</td> +</tr> +</tbody> +</table> +<p><em>Example usage</em>:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">pool</span> <span class="o">=</span> <span class="n">connection</span><span class="o">.</span><span class="n">ChannelPool</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> +<span class="gp">>>> </span><span class="n">c1</span> <span class="o">=</span> <span class="n">pool</span><span class="o">.</span><span class="n">acquire</span><span class="p">()</span> +<span class="gp">>>> </span><span class="n">c2</span> <span class="o">=</span> <span class="n">pool</span><span class="o">.</span><span class="n">acquire</span><span class="p">()</span> +<span class="gp">>>> </span><span class="n">c3</span> <span class="o">=</span> <span class="n">pool</span><span class="o">.</span><span class="n">acquire</span><span class="p">()</span> +<span class="gp">>>> </span><span class="n">c1</span><span class="o">.</span><span class="n">release</span><span class="p">()</span> +<span class="gp">>>> </span><span class="n">c3</span> <span class="o">=</span> <span class="n">pool</span><span class="o">.</span><span class="n">acquire</span><span class="p">()</span> +</pre></div> +</div> +</dd></dl> + +<dl class="method"> +<dt id="kombu.connection.BrokerConnection.SimpleQueue"> +<tt class="descname">SimpleQueue</tt><big>(</big><em>name</em>, <em>no_ack=False</em>, <em>queue_opts=None</em>, <em>exchange_opts=None</em>, <em>channel=None</em><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.SimpleQueue" title="Permalink to this definition">¶</a></dt> +<dd><p>Create new <a class="reference internal" href="kombu.simple.html#kombu.simple.SimpleQueue" title="kombu.simple.SimpleQueue"><tt class="xref py py-class docutils literal"><span class="pre">SimpleQueue</span></tt></a>, using a channel +from this connection.</p> +<p>If <tt class="docutils literal"><span class="pre">name</span></tt> is a string, a queue and exchange will be automatically +created using that name as the name of the queue and exchange, +also it will be used as the default routing key.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>name</strong> – Name of the queue/or a <a class="reference internal" href="kombu.entity.html#kombu.entity.Queue" title="kombu.entity.Queue"><tt class="xref py py-class docutils literal"><span class="pre">Queue</span></tt></a>.</li> +<li><strong>no_ack</strong> – Disable acknowledgements. Default is false.</li> +<li><strong>queue_opts</strong> – Additional keyword arguments passed to the +constructor of the automatically created +<a class="reference internal" href="kombu.entity.html#kombu.entity.Queue" title="kombu.entity.Queue"><tt class="xref py py-class docutils literal"><span class="pre">Queue</span></tt></a>.</li> +<li><strong>exchange_opts</strong> – Additional keyword arguments passed to the +constructor of the automatically created +<a class="reference internal" href="kombu.entity.html#kombu.entity.Exchange" title="kombu.entity.Exchange"><tt class="xref py py-class docutils literal"><span class="pre">Exchange</span></tt></a>.</li> +<li><strong>channel</strong> – Channel to use. If not specified a new channel +from the current connection will be used. Remember to call +<a class="reference internal" href="kombu.simple.html#kombu.simple.SimpleQueue.close" title="kombu.simple.SimpleQueue.close"><tt class="xref py py-meth docutils literal"><span class="pre">close()</span></tt></a> when done with the +object.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="kombu.connection.BrokerConnection.SimpleBuffer"> +<tt class="descname">SimpleBuffer</tt><big>(</big><em>name</em>, <em>no_ack=False</em>, <em>queue_opts=None</em>, <em>exchange_opts=None</em>, <em>channel=None</em><big>)</big><a class="headerlink" href="#kombu.connection.BrokerConnection.SimpleBuffer" title="Permalink to this definition">¶</a></dt> +<dd><p>Create new <a class="reference internal" href="kombu.simple.html#kombu.simple.SimpleQueue" title="kombu.simple.SimpleQueue"><tt class="xref py py-class docutils literal"><span class="pre">SimpleQueue</span></tt></a> using a channel +from this connection.</p> +<p>Same as <a class="reference internal" href="#kombu.connection.BrokerConnection.SimpleQueue" title="kombu.connection.BrokerConnection.SimpleQueue"><tt class="xref py py-meth docutils literal"><span class="pre">SimpleQueue()</span></tt></a>, but configured with buffering +semantics. The resulting queue and exchange will not be durable, also +auto delete is enabled. Messages will be transient (not persistent), +and acknowledgements are disabled (<tt class="docutils literal"><span class="pre">no_ack</span></tt>).</p> +</dd></dl> </dd></dl> </div> +<div class="section" id="pools"> +<h2><a class="toc-backref" href="#id2">Pools</a><a class="headerlink" href="#pools" title="Permalink to this headline">¶</a></h2> +<div class="admonition-see-also admonition seealso"> +<p class="first admonition-title">See also</p> +<p class="last">The shortcut methods <a class="reference internal" href="#kombu.connection.BrokerConnection.Pool" title="kombu.connection.BrokerConnection.Pool"><tt class="xref py py-meth docutils literal"><span class="pre">BrokerConnection.Pool()</span></tt></a> and +<a class="reference internal" href="#kombu.connection.BrokerConnection.ChannelPool" title="kombu.connection.BrokerConnection.ChannelPool"><tt class="xref py py-meth docutils literal"><span class="pre">BrokerConnection.ChannelPool()</span></tt></a> is the recommended way +to instantiate these classes.</p> +</div> +<dl class="class"> +<dt id="kombu.connection.ConnectionPool"> +<em class="property">class </em><tt class="descclassname">kombu.connection.</tt><tt class="descname">ConnectionPool</tt><big>(</big><em>connection</em>, <em>limit=None</em>, <em>preload=None</em><big>)</big><a class="headerlink" href="#kombu.connection.ConnectionPool" title="Permalink to this definition">¶</a></dt> +<dd><dl class="attribute"> +<dt id="kombu.connection.ConnectionPool.LimitExceeded"> +<tt class="descname">LimitExceeded</tt><a class="headerlink" href="#kombu.connection.ConnectionPool.LimitExceeded" title="Permalink to this definition">¶</a></dt> +<dd><p>Maximum number of simultaneous connections exceeded.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.connection.ConnectionPool.acquire"> +<tt class="descname">acquire</tt><big>(</big><em>block=False</em>, <em>timeout=None</em><big>)</big><a class="headerlink" href="#kombu.connection.ConnectionPool.acquire" title="Permalink to this definition">¶</a></dt> +<dd><p>Acquire resource.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>block</strong> – If the limit is exceeded, +block until there is an available item.</li> +<li><strong>timeout</strong> – Timeout to wait +if <tt class="docutils literal"><span class="pre">block</span></tt> is true. Default is <tt class="xref py py-const xref docutils literal"><span class="pre">None</span></tt> (forever).</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name" colspan="2">Raises LimitExceeded:</th></tr> +<tr><td> </td><td class="field-body"><p class="first last">if block is false +and the limit has been exceeded.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="kombu.connection.ConnectionPool.release"> +<tt class="descname">release</tt><big>(</big><em>resource</em><big>)</big><a class="headerlink" href="#kombu.connection.ConnectionPool.release" title="Permalink to this definition">¶</a></dt> +<dd><p>Release resource so it can be used by another thread.</p> +<p>The caller is responsible for discarding the object, +and to never use the resource again. A new resource must +be acquired if so needed.</p> +</dd></dl> + +</dd></dl> + +<dl class="class"> +<dt id="kombu.connection.ChannelPool"> +<em class="property">class </em><tt class="descclassname">kombu.connection.</tt><tt class="descname">ChannelPool</tt><big>(</big><em>connection</em>, <em>limit=None</em>, <em>preload=None</em><big>)</big><a class="headerlink" href="#kombu.connection.ChannelPool" title="Permalink to this definition">¶</a></dt> +<dd><dl class="attribute"> +<dt id="kombu.connection.ChannelPool.LimitExceeded"> +<tt class="descname">LimitExceeded</tt><a class="headerlink" href="#kombu.connection.ChannelPool.LimitExceeded" title="Permalink to this definition">¶</a></dt> +<dd><p>Maximum number of simultaenous channels exceeded.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.connection.ChannelPool.acquire"> +<tt class="descname">acquire</tt><big>(</big><em>block=False</em>, <em>timeout=None</em><big>)</big><a class="headerlink" href="#kombu.connection.ChannelPool.acquire" title="Permalink to this definition">¶</a></dt> +<dd><p>Acquire resource.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>block</strong> – If the limit is exceeded, +block until there is an available item.</li> +<li><strong>timeout</strong> – Timeout to wait +if <tt class="docutils literal"><span class="pre">block</span></tt> is true. Default is <tt class="xref py py-const xref docutils literal"><span class="pre">None</span></tt> (forever).</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name" colspan="2">Raises LimitExceeded:</th></tr> +<tr><td> </td><td class="field-body"><p class="first last">if block is false +and the limit has been exceeded.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="kombu.connection.ChannelPool.release"> +<tt class="descname">release</tt><big>(</big><em>resource</em><big>)</big><a class="headerlink" href="#kombu.connection.ChannelPool.release" title="Permalink to this definition">¶</a></dt> +<dd><p>Release resource so it can be used by another thread.</p> +<p>The caller is responsible for discarding the object, +and to never use the resource again. A new resource must +be acquired if so needed.</p> +</dd></dl> + +</dd></dl> + +</div> +</div> </div> @@ -316,12 +503,21 @@ each retry.</li> <div class="sphinxsidebarwrapper"><p class="logo"><a href="../index.html"> <img class="logo" width="128" height="128" src="http://cloud.github.com/downloads/ask/kombu/kombusmall.jpg" alt="Logo"/> </a></p> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">kombu.connection</a><ul> +<li><a class="reference internal" href="#connection">Connection</a></li> +<li><a class="reference internal" href="#pools">Pools</a></li> +</ul> +</li> +</ul> + <h4>Previous topic</h4> <p class="topless"><a href="index.html" title="previous chapter">API Reference</a></p> <h4>Next topic</h4> <p class="topless"><a href="kombu.simple.html" - title="next chapter">Simple Interface - kombu.simple</a></p> + title="next chapter">kombu.simple</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../sources/reference/kombu.connection.txt" @@ -354,18 +550,18 @@ each retry.</li> <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.simple.html" title="Simple Interface - kombu.simple" + <a href="kombu.simple.html" title="kombu.simple" >next</a> |</li> <li class="right" > <a href="index.html" title="API Reference" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.entity.html b/reference/kombu.entity.html index 5314ec0f..900ab71d 100644 --- a/reference/kombu.entity.html +++ b/reference/kombu.entity.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>AMQP Entities - kombu.entity — Kombu v0.9.0 documentation</title> + <title>kombu.entity — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,10 +21,10 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> - <link rel="next" title="Carrot Compatible API - kombu.compat" href="kombu.compat.html" /> - <link rel="prev" title="Messaging - kombu.messaging" href="kombu.messaging.html" /> + <link rel="next" title="kombu.compat" href="kombu.compat.html" /> + <link rel="prev" title="kombu.messaging" href="kombu.messaging.html" /> </head> <body> <div class="related"> @@ -37,12 +37,12 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.compat.html" title="Carrot Compatible API - kombu.compat" + <a href="kombu.compat.html" title="kombu.compat" accesskey="N">next</a> |</li> <li class="right" > - <a href="kombu.messaging.html" title="Messaging - kombu.messaging" + <a href="kombu.messaging.html" title="kombu.messaging" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -52,18 +52,54 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="amqp-entities-kombu-entity"> -<h1>AMQP Entities - kombu.entity<a class="headerlink" href="#amqp-entities-kombu-entity" title="Permalink to this headline">¶</a></h1> -<span class="target" id="module-kombu.entity"></span><dl class="attribute"> -<dt id="kombu.entity.Binding"> -<tt class="descclassname">kombu.entity.</tt><tt class="descname">Binding</tt><a class="headerlink" href="#kombu.entity.Binding" title="Permalink to this definition">¶</a></dt> -<dd><p>alias of <a class="reference internal" href="#kombu.entity.Queue" title="kombu.entity.Queue"><tt class="xref py py-class docutils literal"><span class="pre">Queue</span></tt></a></p> -</dd></dl> - + <span class="target" id="module-kombu.entity"></span><div class="section" id="kombu-entity"> +<h1>kombu.entity<a class="headerlink" href="#kombu-entity" title="Permalink to this headline">¶</a></h1> +<p>Exchange and Queue declarations.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3"> +<li>2009 - 2010 by Ask Solem.</li> +</ol> +</td> +</tr> +<tr class="field"><th class="field-name">license:</th><td class="field-body"><p class="first last">BSD, see LICENSE for more details.</p> +</td> +</tr> +</tbody> +</table> +<div class="contents local topic" id="contents"> +<ul class="simple"> +<li><a class="reference internal" href="#exchange" id="id1">Exchange</a></li> +<li><a class="reference internal" href="#queue" id="id2">Queue</a></li> +</ul> +</div> +<div class="section" id="exchange"> +<h2><a class="toc-backref" href="#id1">Exchange</a><a class="headerlink" href="#exchange" title="Permalink to this headline">¶</a></h2> +<p>Example creating an exchange declaration:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">news_exchange</span> <span class="o">=</span> <span class="n">Exchange</span><span class="p">(</span><span class="s">"news"</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="s">"topic"</span><span class="p">)</span> +</pre></div> +</div> +<p>For now <cite>news_exchange</cite> is just a declaration, you can’t perform +actions on it. It just describes the name and options for the exchange.</p> +<p>The exchange can be bound or unbound. Bound means the exchange is +associated with a channel and operations can be performed on it. +To bind the exchange you call the exchange with the channel as argument:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">bound_exchange</span> <span class="o">=</span> <span class="n">news_exchange</span><span class="p">(</span><span class="n">channel</span><span class="p">)</span> +</pre></div> +</div> +<p>Now you can perform operations like <tt class="xref py py-meth docutils literal"><span class="pre">declare()</span></tt> or <tt class="xref py py-meth docutils literal"><span class="pre">delete()</span></tt>:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">bound_exchange</span><span class="o">.</span><span class="n">declare</span><span class="p">()</span> +<span class="gp">>>> </span><span class="n">message</span> <span class="o">=</span> <span class="n">bound_exchange</span><span class="o">.</span><span class="n">Message</span><span class="p">(</span><span class="s">"Cure for cancer found!"</span><span class="p">)</span> +<span class="gp">>>> </span><span class="n">bound_exchange</span><span class="o">.</span><span class="n">publish</span><span class="p">(</span><span class="n">message</span><span class="p">,</span> <span class="n">routing_key</span><span class="o">=</span><span class="s">"news.science"</span><span class="p">)</span> +<span class="gp">>>> </span><span class="n">bound_exchange</span><span class="o">.</span><span class="n">delete</span><span class="p">()</span> +</pre></div> +</div> <dl class="class"> <dt id="kombu.entity.Exchange"> <em class="property">class </em><tt class="descclassname">kombu.entity.</tt><tt class="descname">Exchange</tt><big>(</big><em>name=''</em>, <em>type=''</em>, <em>channel=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.entity.Exchange" title="Permalink to this definition">¶</a></dt> -<dd><p>An Exchange.</p> +<dd><p>An Exchange declaration.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> @@ -96,36 +132,36 @@ also define additional exchange types, so see your broker manual for more information about available exchange types.</p> <blockquote> <ul> -<li><p class="first"><tt class="docutils literal"><span class="pre">direct</span></tt> (<em>default</em>)</p> +<li><p class="first"><cite>direct</cite> (<em>default</em>)</p> <blockquote> <p>Direct match between the routing key in the message, and the routing criteria used when a queue is bound to this exchange.</p> </blockquote> </li> -<li><p class="first"><tt class="docutils literal"><span class="pre">topic</span></tt></p> +<li><p class="first"><cite>topic</cite></p> <blockquote> <p>Wildcard match between the routing key and the routing pattern specified in the exchange/queue binding. The routing key is -treated as zero or more words delimited by <tt class="docutils literal"><span class="pre">"."</span></tt> and -supports special wildcard characters. <tt class="docutils literal"><span class="pre">"*"</span></tt> matches a -single word and <tt class="docutils literal"><span class="pre">"#"</span></tt> matches zero or more words.</p> +treated as zero or more words delimited by <cite>”.”</cite> and +supports special wildcard characters. <cite>“*”</cite> matches a +single word and <cite>“#”</cite> matches zero or more words.</p> </blockquote> </li> -<li><p class="first"><tt class="docutils literal"><span class="pre">fanout</span></tt></p> +<li><p class="first"><cite>fanout</cite></p> <blockquote> <p>Queues are bound to this exchange with no arguments. Hence any message sent to this exchange will be forwarded to all queues bound to this exchange.</p> </blockquote> </li> -<li><p class="first"><tt class="docutils literal"><span class="pre">headers</span></tt></p> +<li><p class="first"><cite>headers</cite></p> <blockquote> <p>Queues are bound to this exchange with a table of arguments containing headers and values (optional). A special argument named “x-match” determines the matching algorithm, where -<tt class="docutils literal"><span class="pre">"all"</span></tt> implies an <tt class="docutils literal"><span class="pre">AND</span></tt> (all pairs must match) and -<tt class="docutils literal"><span class="pre">"any"</span></tt> implies <tt class="docutils literal"><span class="pre">OR</span></tt> (at least one pair must match).</p> -<p><tt class="xref py py-attr docutils literal"><span class="pre">arguments`</span></tt> is used to specify the arguments.</p> +<cite>“all”</cite> implies an <cite>AND</cite> (all pairs must match) and +<cite>“any”</cite> implies <cite>OR</cite> (at least one pair must match).</p> +<p><a class="reference internal" href="#kombu.entity.Exchange.arguments" title="kombu.entity.Exchange.arguments"><tt class="xref py py-attr docutils literal"><span class="pre">arguments</span></tt></a> is used to specify the arguments.</p> </blockquote> </li> </ul> @@ -146,23 +182,24 @@ Rajith Attapattu. This article is recommended reading.</p> <tt class="descname">durable</tt><a class="headerlink" href="#kombu.entity.Exchange.durable" title="Permalink to this definition">¶</a></dt> <dd><p>Durable exchanges remain active when a server restarts. Non-durable exchanges (transient exchanges) are purged when a server restarts. -Default is <tt class="xref docutils literal"><span class="pre">True</span></tt>.</p> +Default is <tt class="xref py py-const xref docutils literal"><span class="pre">True</span></tt>.</p> </dd></dl> <dl class="attribute"> <dt id="kombu.entity.Exchange.auto_delete"> <tt class="descname">auto_delete</tt><a class="headerlink" href="#kombu.entity.Exchange.auto_delete" title="Permalink to this definition">¶</a></dt> <dd><p>If set, the exchange is deleted when all queues have finished -using it. Default is <tt class="xref docutils literal"><span class="pre">False</span></tt>.</p> +using it. Default is <tt class="xref py py-const xref docutils literal"><span class="pre">False</span></tt>.</p> </dd></dl> <dl class="attribute"> <dt id="kombu.entity.Exchange.delivery_mode"> <tt class="descname">delivery_mode</tt><a class="headerlink" href="#kombu.entity.Exchange.delivery_mode" title="Permalink to this definition">¶</a></dt> -<dd><p>The default delivery mode used for messages. The value is an integer.</p> +<dd><p>The default delivery mode used for messages. The value is an integer, +or alias string.</p> <blockquote> <ul> -<li><p class="first">1 or “transient”</p> +<li><p class="first">1 or <cite>“transient”</cite></p> <blockquote> <p>The message is transient. Which means it is stored in memory only, and is lost if the server dies or restarts.</p> @@ -178,7 +215,7 @@ preserved if the server dies or restarts.</p> </li> </ul> </blockquote> -<p>The default value is <tt class="docutils literal"><span class="pre">2</span></tt> (persistent).</p> +<p>The default value is 2 (persistent).</p> </dd></dl> <dl class="attribute"> @@ -187,26 +224,12 @@ preserved if the server dies or restarts.</p> <dd><p>Additional arguments to specify when the exchange is declared.</p> </dd></dl> -<p><strong>Usage</strong></p> -<p>Example creating an exchange declaration:</p> -<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">news_exchange</span> <span class="o">=</span> <span class="n">Exchange</span><span class="p">(</span><span class="s">"news"</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="s">"topic"</span><span class="p">)</span> -</pre></div> -</div> -<p>For now <tt class="docutils literal"><span class="pre">news_exchange</span></tt> is just a declaration, you can’t perform -actions on it. It just describes the name and options for the exchange.</p> -<p>The exchange can be bound or unbound. Bound means the exchange is -associated with a channel and operations can be performed on it. -To bind the exchange you call the exchange with the channel as argument:</p> -<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">bound_exchange</span> <span class="o">=</span> <span class="n">news_exchange</span><span class="p">(</span><span class="n">channel</span><span class="p">)</span> -</pre></div> -</div> -<p>Now you can perform operations like <a class="reference internal" href="#kombu.entity.Exchange.declare" title="kombu.entity.Exchange.declare"><tt class="xref py py-meth docutils literal"><span class="pre">declare()</span></tt></a> or <a class="reference internal" href="#kombu.entity.Exchange.delete" title="kombu.entity.Exchange.delete"><tt class="xref py py-meth docutils literal"><span class="pre">delete()</span></tt></a>:</p> -<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">bound_exchange</span><span class="o">.</span><span class="n">declare</span><span class="p">()</span> -<span class="gp">>>> </span><span class="n">message</span> <span class="o">=</span> <span class="n">bound_exchange</span><span class="o">.</span><span class="n">Message</span><span class="p">(</span><span class="s">"Cure for cancer found!"</span><span class="p">)</span> -<span class="gp">>>> </span><span class="n">bound_exchange</span><span class="o">.</span><span class="n">publish</span><span class="p">(</span><span class="n">message</span><span class="p">,</span> <span class="n">routing_key</span><span class="o">=</span><span class="s">"news.science"</span><span class="p">)</span> -<span class="gp">>>> </span><span class="n">bound_exchange</span><span class="o">.</span><span class="n">delete</span><span class="p">()</span> -</pre></div> -</div> +<dl class="method"> +<dt id="kombu.entity.Exchange.maybe_bind"> +<tt class="descname">maybe_bind</tt><big>(</big><em>channel</em><big>)</big><a class="headerlink" href="#kombu.entity.Exchange.maybe_bind" title="Permalink to this definition">¶</a></dt> +<dd><p>Bind instance to channel if not already bound.</p> +</dd></dl> + <dl class="method"> <dt id="kombu.entity.Exchange.Message"> <tt class="descname">Message</tt><big>(</big><em>body</em>, <em>delivery_mode=None</em>, <em>priority=None</em>, <em>content_type=None</em>, <em>content_encoding=None</em>, <em>properties=None</em>, <em>headers=None</em><big>)</big><a class="headerlink" href="#kombu.entity.Exchange.Message" title="Permalink to this definition">¶</a></dt> @@ -219,7 +242,7 @@ To bind the exchange you call the exchange with the channel as argument:</p> <li><strong>body</strong> – Message body.</li> <li><strong>delivery_mode</strong> – Set custom delivery mode. Defaults to <a class="reference internal" href="#kombu.entity.Exchange.delivery_mode" title="kombu.entity.Exchange.delivery_mode"><tt class="xref py py-attr docutils literal"><span class="pre">delivery_mode</span></tt></a>.</li> -<li><strong>priority</strong> – Message priority, <tt class="docutils literal"><span class="pre">0</span></tt> to <tt class="docutils literal"><span class="pre">9</span></tt>. (currently not +<li><strong>priority</strong> – Message priority, 0 to 9. (currently not supported by RabbitMQ).</li> <li><strong>content_type</strong> – The messages content_type. If content_type is set, no serialization occurs as it is assumed this is either @@ -250,7 +273,7 @@ properly sets content_encoding.</li> <tbody valign="top"> <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> <li><strong>nowait</strong> – If set the server will not respond, and a -response will not be waited for. Default is <tt class="xref docutils literal"><span class="pre">False</span></tt>.</li> +response will not be waited for. Default is <tt class="xref py py-const xref docutils literal"><span class="pre">False</span></tt>.</li> </ul> </td> </tr> @@ -268,9 +291,9 @@ response will not be waited for. Default is <tt class="xref docutils literal"><s <tbody valign="top"> <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> <li><strong>if_unused</strong> – Delete only if the exchange has no bindings. -Default is <tt class="xref docutils literal"><span class="pre">False</span></tt>.</li> +Default is <tt class="xref py py-const xref docutils literal"><span class="pre">False</span></tt>.</li> <li><strong>nowait</strong> – If set the server will not respond, and a -response will not be waited for. Default is <tt class="xref docutils literal"><span class="pre">False</span></tt>.</li> +response will not be waited for. Default is <tt class="xref py py-const xref docutils literal"><span class="pre">False</span></tt>.</li> </ul> </td> </tr> @@ -300,6 +323,31 @@ response will not be waited for. Default is <tt class="xref docutils literal"><s </dd></dl> +</div> +<div class="section" id="queue"> +<h2><a class="toc-backref" href="#id2">Queue</a><a class="headerlink" href="#queue" title="Permalink to this headline">¶</a></h2> +<p>Example creating a queue using our exchange in the <a class="reference internal" href="#kombu.entity.Exchange" title="kombu.entity.Exchange"><tt class="xref py py-class docutils literal"><span class="pre">Exchange</span></tt></a> +example:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">science_news</span> <span class="o">=</span> <span class="n">Queue</span><span class="p">(</span><span class="s">"science_news"</span><span class="p">,</span> +<span class="gp">... </span> <span class="n">exchange</span><span class="o">=</span><span class="n">news_exchange</span><span class="p">,</span> +<span class="gp">... </span> <span class="n">routing_key</span><span class="o">=</span><span class="s">"news.science"</span><span class="p">)</span> +</pre></div> +</div> +<p>For now <cite>science_news</cite> is just a declaration, you can’t perform +actions on it. It just describes the name and options for the queue.</p> +<p>The queue can be bound or unbound. Bound means the queue is +associated with a channel and operations can be performed on it. +To bind the queue you call the queue instance with the channel as +an argument:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">bound_science_news</span> <span class="o">=</span> <span class="n">science_news</span><span class="p">(</span><span class="n">channel</span><span class="p">)</span> +</pre></div> +</div> +<p>Now you can perform operations like <tt class="xref py py-meth docutils literal"><span class="pre">declare()</span></tt> or <tt class="xref py py-meth docutils literal"><span class="pre">purge()</span></tt>:</p> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">bound_sicence_news</span><span class="o">.</span><span class="n">declare</span><span class="p">()</span> +<span class="gp">>>> </span><span class="n">bound_science_news</span><span class="o">.</span><span class="n">purge</span><span class="p">()</span> +<span class="gp">>>> </span><span class="n">bound_science_news</span><span class="o">.</span><span class="n">delete</span><span class="p">()</span> +</pre></div> +</div> <dl class="class"> <dt id="kombu.entity.Queue"> <em class="property">class </em><tt class="descclassname">kombu.entity.</tt><tt class="descname">Queue</tt><big>(</big><em>name=''</em>, <em>exchange=None</em>, <em>routing_key=''</em>, <em>channel=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.entity.Queue" title="Permalink to this definition">¶</a></dt> @@ -358,12 +406,12 @@ the <a class="reference internal" href="#kombu.entity.Queue.routing_key" title=" <blockquote> <p>Matches the routing key property of the message by a primitive pattern matching scheme. The message routing key then consists -of words separated by dots (<tt class="docutils literal"><span class="pre">"."</span></tt>, like domain names), and -two special characters are available; star (<tt class="docutils literal"><span class="pre">"*"</span></tt>) and hash -(<tt class="docutils literal"><span class="pre">"#"</span></tt>). The star matches any word, and the hash matches -zero or more words. For example <tt class="docutils literal"><span class="pre">"*.stock.#"</span></tt> matches the -routing keys <tt class="docutils literal"><span class="pre">"usd.stock"</span></tt> and <tt class="docutils literal"><span class="pre">"eur.stock.db"</span></tt> but not -<tt class="docutils literal"><span class="pre">"stock.nasdaq"</span></tt>.</p> +of words separated by dots (<cite>”.”</cite>, like domain names), and +two special characters are available; star (<cite>“*”</cite>) and hash +(<cite>“#”</cite>). The star matches any word, and the hash matches +zero or more words. For example <cite>“*.stock.#”</cite> matches the +routing keys <cite>“usd.stock”</cite> and <cite>“eur.stock.db”</cite> but not +<cite>“stock.nasdaq”</cite>.</p> </blockquote> </li> </ul> @@ -385,7 +433,7 @@ a server restarts. Note that durable queues do not necessarily hold persistent messages, although it does not make sense to send persistent messages to a transient queue.</p> -<p>Default is <tt class="xref docutils literal"><span class="pre">True</span></tt>.</p> +<p>Default is <tt class="xref py py-const xref docutils literal"><span class="pre">True</span></tt>.</p> </dd></dl> <dl class="attribute"> @@ -394,7 +442,7 @@ persistent messages to a transient queue.</p> <dd><p>Exclusive queues may only be consumed from by the current connection. Setting the ‘exclusive’ flag always implies ‘auto-delete’.</p> -<p>Default is <tt class="xref docutils literal"><span class="pre">False</span></tt>.</p> +<p>Default is <tt class="xref py py-const xref docutils literal"><span class="pre">False</span></tt>.</p> </dd></dl> <dl class="attribute"> @@ -419,29 +467,12 @@ deleted.</p> <dd><p>Additional arguments used when binding the queue.</p> </dd></dl> -<p><strong>Usage</strong></p> -<p>Example creating a queue using our exchange in the <a class="reference internal" href="#kombu.entity.Exchange" title="kombu.entity.Exchange"><tt class="xref py py-class docutils literal"><span class="pre">Exchange</span></tt></a> -example:</p> -<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">science_news</span> <span class="o">=</span> <span class="n">Queue</span><span class="p">(</span><span class="s">"science_news"</span><span class="p">,</span> -<span class="gp">... </span> <span class="n">exchange</span><span class="o">=</span><span class="n">news_exchange</span><span class="p">,</span> -<span class="gp">... </span> <span class="n">routing_key</span><span class="o">=</span><span class="s">"news.science"</span><span class="p">)</span> -</pre></div> -</div> -<p>For now <tt class="docutils literal"><span class="pre">science_news</span></tt> is just a declaration, you can’t perform -actions on it. It just describes the name and options for the queue.</p> -<p>The queue can be bound or unbound. Bound means the queue is -associated with a channel and operations can be performed on it. -To bind the queue you call the queue instance with the channel as -an argument:</p> -<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">bound_science_news</span> <span class="o">=</span> <span class="n">science_news</span><span class="p">(</span><span class="n">channel</span><span class="p">)</span> -</pre></div> -</div> -<p>Now you can perform operations like <a class="reference internal" href="#kombu.entity.Queue.declare" title="kombu.entity.Queue.declare"><tt class="xref py py-meth docutils literal"><span class="pre">declare()</span></tt></a> or <a class="reference internal" href="#kombu.entity.Queue.purge" title="kombu.entity.Queue.purge"><tt class="xref py py-meth docutils literal"><span class="pre">purge()</span></tt></a>:</p> -<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">bound_sicence_news</span><span class="o">.</span><span class="n">declare</span><span class="p">()</span> -<span class="gp">>>> </span><span class="n">bound_science_news</span><span class="o">.</span><span class="n">purge</span><span class="p">()</span> -<span class="gp">>>> </span><span class="n">bound_science_news</span><span class="o">.</span><span class="n">delete</span><span class="p">()</span> -</pre></div> -</div> +<dl class="method"> +<dt id="kombu.entity.Queue.maybe_bind"> +<tt class="descname">maybe_bind</tt><big>(</big><em>channel</em><big>)</big><a class="headerlink" href="#kombu.entity.Queue.maybe_bind" title="Permalink to this definition">¶</a></dt> +<dd><p>Bind instance to channel if not already bound.</p> +</dd></dl> + <dl class="method"> <dt id="kombu.entity.Queue.cancel"> <tt class="descname">cancel</tt><big>(</big><em>consumer_tag</em><big>)</big><a class="headerlink" href="#kombu.entity.Queue.cancel" title="Permalink to this definition">¶</a></dt> @@ -560,7 +591,7 @@ is more important than performance.</p> <tbody valign="top"> <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> <li><strong>nowait</strong> – Do not wait for a reply.</li> -<li><strong>passive</strong> – If set, the server will not create the queue. +<li><strong>passive</strong> – If set, the server will not create the queue. The client can use this to check whether a queue exists without modifying the server state.</li> </ul> @@ -584,6 +615,7 @@ without modifying the server state.</li> </dd></dl> </div> +</div> </div> @@ -593,12 +625,21 @@ without modifying the server state.</li> <div class="sphinxsidebarwrapper"><p class="logo"><a href="../index.html"> <img class="logo" width="128" height="128" src="http://cloud.github.com/downloads/ask/kombu/kombusmall.jpg" alt="Logo"/> </a></p> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">kombu.entity</a><ul> +<li><a class="reference internal" href="#exchange">Exchange</a></li> +<li><a class="reference internal" href="#queue">Queue</a></li> +</ul> +</li> +</ul> + <h4>Previous topic</h4> <p class="topless"><a href="kombu.messaging.html" - title="previous chapter">Messaging - kombu.messaging</a></p> + title="previous chapter">kombu.messaging</a></p> <h4>Next topic</h4> <p class="topless"><a href="kombu.compat.html" - title="next chapter">Carrot Compatible API - kombu.compat</a></p> + title="next chapter">kombu.compat</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../sources/reference/kombu.entity.txt" @@ -631,18 +672,18 @@ without modifying the server state.</li> <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.compat.html" title="Carrot Compatible API - kombu.compat" + <a href="kombu.compat.html" title="kombu.compat" >next</a> |</li> <li class="right" > - <a href="kombu.messaging.html" title="Messaging - kombu.messaging" + <a href="kombu.messaging.html" title="kombu.messaging" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.exceptions.html b/reference/kombu.exceptions.html index c3c2763e..ac087ac2 100644 --- a/reference/kombu.exceptions.html +++ b/reference/kombu.exceptions.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Exceptions - kombu.exceptions — Kombu v0.9.0 documentation</title> + <title>kombu.exceptions — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,10 +21,10 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> - <link rel="next" title="Transports - kombu.transport" href="kombu.transport.html" /> - <link rel="prev" title="Process Mailbox - kombu.pidbox" href="kombu.pidbox.html" /> + <link rel="next" title="<no title>" href="kombu.transport.html" /> + <link rel="prev" title="kombu.pidbox" href="kombu.pidbox.html" /> </head> <body> <div class="related"> @@ -37,12 +37,12 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.transport.html" title="Transports - kombu.transport" + <a href="kombu.transport.html" title="<no title>" accesskey="N">next</a> |</li> <li class="right" > - <a href="kombu.pidbox.html" title="Process Mailbox - kombu.pidbox" + <a href="kombu.pidbox.html" title="kombu.pidbox" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -52,12 +52,27 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="exceptions-kombu-exceptions"> -<h1>Exceptions - kombu.exceptions<a class="headerlink" href="#exceptions-kombu-exceptions" title="Permalink to this headline">¶</a></h1> -<span class="target" id="module-kombu.exceptions"></span><dl class="exception"> -<dt id="kombu.exceptions.EnsureExhausted"> -<em class="property">exception </em><tt class="descclassname">kombu.exceptions.</tt><tt class="descname">EnsureExhausted</tt><a class="headerlink" href="#kombu.exceptions.EnsureExhausted" title="Permalink to this definition">¶</a></dt> -<dd><p>ensure() limit exceeded.</p> + <span class="target" id="module-kombu.exceptions"></span><div class="section" id="kombu-exceptions"> +<h1>kombu.exceptions<a class="headerlink" href="#kombu-exceptions" title="Permalink to this headline">¶</a></h1> +<p>Exceptions.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3"> +<li>2009 - 2010 by Ask Solem.</li> +</ol> +</td> +</tr> +<tr class="field"><th class="field-name">license:</th><td class="field-body"><p class="first last">BSD, see LICENSE for more details.</p> +</td> +</tr> +</tbody> +</table> +<dl class="exception"> +<dt id="kombu.exceptions.NotBoundError"> +<em class="property">exception </em><tt class="descclassname">kombu.exceptions.</tt><tt class="descname">NotBoundError</tt><a class="headerlink" href="#kombu.exceptions.NotBoundError" title="Permalink to this definition">¶</a></dt> +<dd><p>Trying to call channel dependent method on unbound entity.</p> </dd></dl> <dl class="exception"> @@ -67,27 +82,33 @@ </dd></dl> <dl class="exception"> -<dt id="kombu.exceptions.NotBoundError"> -<em class="property">exception </em><tt class="descclassname">kombu.exceptions.</tt><tt class="descname">NotBoundError</tt><a class="headerlink" href="#kombu.exceptions.NotBoundError" title="Permalink to this definition">¶</a></dt> -<dd><p>Trying to call channel dependent method on unbound entity.</p> +<dt id="kombu.exceptions.EnsureExhausted"> +<em class="property">exception </em><tt class="descclassname">kombu.exceptions.</tt><tt class="descname">EnsureExhausted</tt><a class="headerlink" href="#kombu.exceptions.EnsureExhausted" title="Permalink to this definition">¶</a></dt> +<dd><p>ensure() limit exceeded.</p> </dd></dl> <dl class="exception"> -<dt id="kombu.exceptions.PoolExhausted"> -<em class="property">exception </em><tt class="descclassname">kombu.exceptions.</tt><tt class="descname">PoolExhausted</tt><a class="headerlink" href="#kombu.exceptions.PoolExhausted" title="Permalink to this definition">¶</a></dt> -<dd><p>All connections acquired.</p> +<dt id="kombu.exceptions.TimeoutError"> +<em class="property">exception </em><tt class="descclassname">kombu.exceptions.</tt><tt class="descname">TimeoutError</tt><a class="headerlink" href="#kombu.exceptions.TimeoutError" title="Permalink to this definition">¶</a></dt> +<dd><p>Operation timed out.</p> </dd></dl> <dl class="exception"> -<dt id="kombu.exceptions.PoolLimitExceeded"> -<em class="property">exception </em><tt class="descclassname">kombu.exceptions.</tt><tt class="descname">PoolLimitExceeded</tt><a class="headerlink" href="#kombu.exceptions.PoolLimitExceeded" title="Permalink to this definition">¶</a></dt> -<dd><p>Can’t add more connections to pool.</p> +<dt id="kombu.exceptions.LimitExceeded"> +<em class="property">exception </em><tt class="descclassname">kombu.exceptions.</tt><tt class="descname">LimitExceeded</tt><a class="headerlink" href="#kombu.exceptions.LimitExceeded" title="Permalink to this definition">¶</a></dt> +<dd><p>Limit exceeded.</p> </dd></dl> <dl class="exception"> -<dt id="kombu.exceptions.TimeoutError"> -<em class="property">exception </em><tt class="descclassname">kombu.exceptions.</tt><tt class="descname">TimeoutError</tt><a class="headerlink" href="#kombu.exceptions.TimeoutError" title="Permalink to this definition">¶</a></dt> -<dd><p>Operation timed out.</p> +<dt id="kombu.exceptions.ConnectionLimitExceeded"> +<em class="property">exception </em><tt class="descclassname">kombu.exceptions.</tt><tt class="descname">ConnectionLimitExceeded</tt><a class="headerlink" href="#kombu.exceptions.ConnectionLimitExceeded" title="Permalink to this definition">¶</a></dt> +<dd><p>Maximum number of simultaneous connections exceeded.</p> +</dd></dl> + +<dl class="exception"> +<dt id="kombu.exceptions.ChannelLimitExceeded"> +<em class="property">exception </em><tt class="descclassname">kombu.exceptions.</tt><tt class="descname">ChannelLimitExceeded</tt><a class="headerlink" href="#kombu.exceptions.ChannelLimitExceeded" title="Permalink to this definition">¶</a></dt> +<dd><p>Maximum number of simultaenous channels exceeded.</p> </dd></dl> </div> @@ -102,10 +123,10 @@ </a></p> <h4>Previous topic</h4> <p class="topless"><a href="kombu.pidbox.html" - title="previous chapter">Process Mailbox - kombu.pidbox</a></p> + title="previous chapter">kombu.pidbox</a></p> <h4>Next topic</h4> <p class="topless"><a href="kombu.transport.html" - title="next chapter">Transports - kombu.transport</a></p> + title="next chapter"><no title></a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../sources/reference/kombu.exceptions.txt" @@ -138,18 +159,18 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.transport.html" title="Transports - kombu.transport" + <a href="kombu.transport.html" title="<no title>" >next</a> |</li> <li class="right" > - <a href="kombu.pidbox.html" title="Process Mailbox - kombu.pidbox" + <a href="kombu.pidbox.html" title="kombu.pidbox" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.messaging.html b/reference/kombu.messaging.html index 10f40e97..3d43e566 100644 --- a/reference/kombu.messaging.html +++ b/reference/kombu.messaging.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Messaging - kombu.messaging — Kombu v0.9.0 documentation</title> + <title>kombu.messaging — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,10 +21,10 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> - <link rel="next" title="AMQP Entities - kombu.entity" href="kombu.entity.html" /> - <link rel="prev" title="Simple Interface - kombu.simple" href="kombu.simple.html" /> + <link rel="next" title="kombu.entity" href="kombu.entity.html" /> + <link rel="prev" title="kombu.simple" href="kombu.simple.html" /> </head> <body> <div class="related"> @@ -37,12 +37,12 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.entity.html" title="AMQP Entities - kombu.entity" + <a href="kombu.entity.html" title="kombu.entity" accesskey="N">next</a> |</li> <li class="right" > - <a href="kombu.simple.html" title="Simple Interface - kombu.simple" + <a href="kombu.simple.html" title="kombu.simple" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -52,9 +52,276 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="messaging-kombu-messaging"> -<h1>Messaging - kombu.messaging<a class="headerlink" href="#messaging-kombu-messaging" title="Permalink to this headline">¶</a></h1> -<span class="target" id="module-kombu.messaging"></span><dl class="class"> + <span class="target" id="module-kombu.messaging"></span><div class="section" id="kombu-messaging"> +<h1>kombu.messaging<a class="headerlink" href="#kombu-messaging" title="Permalink to this headline">¶</a></h1> +<p>Sending and receiving messages.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3"> +<li>2009 - 2010 by Ask Solem.</li> +</ol> +</td> +</tr> +<tr class="field"><th class="field-name">license:</th><td class="field-body"><p class="first last">BSD, see LICENSE for more details.</p> +</td> +</tr> +</tbody> +</table> +<div class="contents local topic" id="contents"> +<ul class="simple"> +<li><a class="reference internal" href="#message-producer" id="id1">Message Producer</a></li> +<li><a class="reference internal" href="#message-consumer" id="id2">Message Consumer</a></li> +</ul> +</div> +<div class="section" id="message-producer"> +<h2><a class="toc-backref" href="#id1">Message Producer</a><a class="headerlink" href="#message-producer" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="kombu.messaging.Producer"> +<em class="property">class </em><tt class="descclassname">kombu.messaging.</tt><tt class="descname">Producer</tt><big>(</big><em>channel</em>, <em>exchange=None</em>, <em>routing_key=None</em>, <em>serializer=None</em>, <em>auto_declare=None</em>, <em>compression=None</em>, <em>on_return=None</em><big>)</big><a class="headerlink" href="#kombu.messaging.Producer" title="Permalink to this definition">¶</a></dt> +<dd><p>Message Producer.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>channel</strong> – Connection channel.</li> +<li><strong>exchange</strong> – Default exchange.</li> +<li><strong>routing_key</strong> – Default routing key.</li> +<li><strong>serializer</strong> – Default serializer. Default is <cite>“json”</cite>.</li> +<li><strong>compression</strong> – Default compression method. Default is no +compression.</li> +<li><strong>auto_declare</strong> – Automatically declare the exchange +at instantiation. Default is <tt class="xref py py-const xref docutils literal"><span class="pre">True</span></tt>.</li> +<li><strong>on_return</strong> – Callback to call for undeliverable messages, +when the <cite>mandatory</cite> or <cite>imediate</cite> arguments to +<a class="reference internal" href="#kombu.messaging.Producer.publish" title="kombu.messaging.Producer.publish"><tt class="xref py py-meth docutils literal"><span class="pre">publish()</span></tt></a> is used. This callback needs the following +signature: <cite>(exception, exchange, routing_key, message)</cite>.</li> +</ul> +</td> +</tr> +</tbody> +</table> +<dl class="attribute"> +<dt id="kombu.messaging.Producer.channel"> +<tt class="descname">channel</tt><a class="headerlink" href="#kombu.messaging.Producer.channel" title="Permalink to this definition">¶</a></dt> +<dd><p>The connection channel used.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.messaging.Producer.exchange"> +<tt class="descname">exchange</tt><a class="headerlink" href="#kombu.messaging.Producer.exchange" title="Permalink to this definition">¶</a></dt> +<dd><p>An Exchange declaration.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>name</strong> – See <a class="reference internal" href="#kombu.messaging.Producer.name" title="kombu.messaging.Producer.name"><tt class="xref py py-attr docutils literal"><span class="pre">name</span></tt></a>.</li> +<li><strong>type</strong> – See <a class="reference internal" href="#kombu.messaging.Producer.type" title="kombu.messaging.Producer.type"><tt class="xref py py-attr docutils literal"><span class="pre">type</span></tt></a>.</li> +<li><strong>channel</strong> – See <a class="reference internal" href="#kombu.messaging.Producer.channel" title="kombu.messaging.Producer.channel"><tt class="xref py py-attr docutils literal"><span class="pre">channel</span></tt></a>.</li> +<li><strong>durable</strong> – See <a class="reference internal" href="#kombu.messaging.Producer.durable" title="kombu.messaging.Producer.durable"><tt class="xref py py-attr docutils literal"><span class="pre">durable</span></tt></a>.</li> +<li><strong>auto_delete</strong> – See <a class="reference internal" href="#kombu.messaging.Producer.auto_delete" title="kombu.messaging.Producer.auto_delete"><tt class="xref py py-attr docutils literal"><span class="pre">auto_delete</span></tt></a>.</li> +<li><strong>delivery_mode</strong> – See <a class="reference internal" href="#kombu.messaging.Producer.delivery_mode" title="kombu.messaging.Producer.delivery_mode"><tt class="xref py py-attr docutils literal"><span class="pre">delivery_mode</span></tt></a>.</li> +<li><strong>arguments</strong> – See <a class="reference internal" href="#kombu.messaging.Producer.arguments" title="kombu.messaging.Producer.arguments"><tt class="xref py py-attr docutils literal"><span class="pre">arguments</span></tt></a>.</li> +</ul> +</td> +</tr> +</tbody> +</table> +<dl class="attribute"> +<dt id="kombu.messaging.Producer.name"> +<tt class="descname">name</tt><a class="headerlink" href="#kombu.messaging.Producer.name" title="Permalink to this definition">¶</a></dt> +<dd><p>Name of the exchange. Default is no name (the default exchange).</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.messaging.Producer.type"> +<tt class="descname">type</tt><a class="headerlink" href="#kombu.messaging.Producer.type" title="Permalink to this definition">¶</a></dt> +<dd><p>AMQP defines four default exchange types (routing algorithms) that +covers most of the common messaging use cases. An AMQP broker can +also define additional exchange types, so see your broker +manual for more information about available exchange types.</p> +<blockquote> +<ul> +<li><p class="first"><cite>direct</cite> (<em>default</em>)</p> +<blockquote> +<p>Direct match between the routing key in the message, and the +routing criteria used when a queue is bound to this exchange.</p> +</blockquote> +</li> +<li><p class="first"><cite>topic</cite></p> +<blockquote> +<p>Wildcard match between the routing key and the routing pattern +specified in the exchange/queue binding. The routing key is +treated as zero or more words delimited by <cite>”.”</cite> and +supports special wildcard characters. <cite>“*”</cite> matches a +single word and <cite>“#”</cite> matches zero or more words.</p> +</blockquote> +</li> +<li><p class="first"><cite>fanout</cite></p> +<blockquote> +<p>Queues are bound to this exchange with no arguments. Hence any +message sent to this exchange will be forwarded to all queues +bound to this exchange.</p> +</blockquote> +</li> +<li><p class="first"><cite>headers</cite></p> +<blockquote> +<p>Queues are bound to this exchange with a table of arguments +containing headers and values (optional). A special argument +named “x-match” determines the matching algorithm, where +<cite>“all”</cite> implies an <cite>AND</cite> (all pairs must match) and +<cite>“any”</cite> implies <cite>OR</cite> (at least one pair must match).</p> +<p><a class="reference internal" href="#kombu.messaging.Producer.arguments" title="kombu.messaging.Producer.arguments"><tt class="xref py py-attr docutils literal"><span class="pre">arguments</span></tt></a> is used to specify the arguments.</p> +</blockquote> +</li> +</ul> +<p>This description of AMQP exchange types was shamelessly stolen +from the blog post <a class="reference external" href="http://bit.ly/amqp-exchange-types">AMQP in 10 minutes: Part 4</a> by +Rajith Attapattu. This article is recommended reading.</p> +</blockquote> +</dd></dl> + +<dl class="attribute"> +<dt> +<tt class="descname">channel</tt></dt> +<dd><p>The channel the exchange is bound to (if bound).</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.messaging.Producer.durable"> +<tt class="descname">durable</tt><a class="headerlink" href="#kombu.messaging.Producer.durable" title="Permalink to this definition">¶</a></dt> +<dd><p>Durable exchanges remain active when a server restarts. Non-durable +exchanges (transient exchanges) are purged when a server restarts. +Default is <tt class="xref py py-const xref docutils literal"><span class="pre">True</span></tt>.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.messaging.Producer.auto_delete"> +<tt class="descname">auto_delete</tt><a class="headerlink" href="#kombu.messaging.Producer.auto_delete" title="Permalink to this definition">¶</a></dt> +<dd><p>If set, the exchange is deleted when all queues have finished +using it. Default is <tt class="xref py py-const xref docutils literal"><span class="pre">False</span></tt>.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.messaging.Producer.delivery_mode"> +<tt class="descname">delivery_mode</tt><a class="headerlink" href="#kombu.messaging.Producer.delivery_mode" title="Permalink to this definition">¶</a></dt> +<dd><p>The default delivery mode used for messages. The value is an integer, +or alias string.</p> +<blockquote> +<ul> +<li><p class="first">1 or <cite>“transient”</cite></p> +<blockquote> +<p>The message is transient. Which means it is stored in +memory only, and is lost if the server dies or restarts.</p> +</blockquote> +</li> +<li><dl class="first docutils"> +<dt>2 or “persistent” (<em>default</em>)</dt> +<dd><p class="first last">The message is persistent. Which means the message is +stored both in-memory, and on disk, and therefore +preserved if the server dies or restarts.</p> +</dd> +</dl> +</li> +</ul> +</blockquote> +<p>The default value is 2 (persistent).</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.messaging.Producer.arguments"> +<tt class="descname">arguments</tt><a class="headerlink" href="#kombu.messaging.Producer.arguments" title="Permalink to this definition">¶</a></dt> +<dd><p>Additional arguments to specify when the exchange is declared.</p> +</dd></dl> + +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.messaging.Producer.routing_key"> +<tt class="descname">routing_key</tt><a class="headerlink" href="#kombu.messaging.Producer.routing_key" title="Permalink to this definition">¶</a></dt> +<dd><p>str(object) -> string</p> +<p>Return a nice string representation of the object. +If the argument is a string, the return value is the same object.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.messaging.Producer.serializer"> +<tt class="descname">serializer</tt><a class="headerlink" href="#kombu.messaging.Producer.serializer" title="Permalink to this definition">¶</a></dt> +<dd><p>Default serializer to use. Default is JSON.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.messaging.Producer.compression"> +<tt class="descname">compression</tt><a class="headerlink" href="#kombu.messaging.Producer.compression" title="Permalink to this definition">¶</a></dt> +<dd><p>Default compression method. Disabled by default.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.messaging.Producer.auto_declare"> +<tt class="descname">auto_declare</tt><a class="headerlink" href="#kombu.messaging.Producer.auto_declare" title="Permalink to this definition">¶</a></dt> +<dd><p>By default the exchange is declared at instantiation. +If you want to declare manually then you can set this +to <tt class="xref py py-const xref docutils literal"><span class="pre">False</span></tt>.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.messaging.Producer.on_return"> +<tt class="descname">on_return</tt><a class="headerlink" href="#kombu.messaging.Producer.on_return" title="Permalink to this definition">¶</a></dt> +<dd><p>Basic return callback.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.messaging.Producer.declare"> +<tt class="descname">declare</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.messaging.Producer.declare" title="Permalink to this definition">¶</a></dt> +<dd><p>Declare the exchange.</p> +<p>This is done automatically at instantiation if <a class="reference internal" href="#kombu.messaging.Producer.auto_declare" title="kombu.messaging.Producer.auto_declare"><tt class="xref py py-attr docutils literal"><span class="pre">auto_declare</span></tt></a> +is set to <tt class="xref py py-const xref docutils literal"><span class="pre">True</span></tt>.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.messaging.Producer.publish"> +<tt class="descname">publish</tt><big>(</big><em>body</em>, <em>routing_key=None</em>, <em>delivery_mode=None</em>, <em>mandatory=False</em>, <em>immediate=False</em>, <em>priority=0</em>, <em>content_type=None</em>, <em>content_encoding=None</em>, <em>serializer=None</em>, <em>headers=None</em>, <em>compression=None</em>, <em>exchange=None</em><big>)</big><a class="headerlink" href="#kombu.messaging.Producer.publish" title="Permalink to this definition">¶</a></dt> +<dd><p>Publish message to the specified exchange.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>body</strong> – Message body.</li> +<li><strong>routing_key</strong> – Message routing key.</li> +<li><strong>delivery_mode</strong> – See <a class="reference internal" href="#kombu.messaging.Producer.delivery_mode" title="kombu.messaging.Producer.delivery_mode"><tt class="xref py py-attr docutils literal"><span class="pre">delivery_mode</span></tt></a>.</li> +<li><strong>mandatory</strong> – Currently not supported.</li> +<li><strong>immediate</strong> – Currently not supported.</li> +<li><strong>priority</strong> – Message priority. A number between 0 and 9.</li> +<li><strong>content_type</strong> – Content type. Default is autodetect.</li> +<li><strong>content_encoding</strong> – Content encoding. Default is autodetect.</li> +<li><strong>serializer</strong> – Serializer to use. Default is autodetect.</li> +<li><strong>headers</strong> – Mapping of arbitrary headers to pass along +with the message body.</li> +<li><strong>exchange</strong> – Override the exchange. Note that this exchange +must have been declared.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +<dl class="method"> +<dt id="kombu.messaging.Producer.revive"> +<tt class="descname">revive</tt><big>(</big><em>channel</em><big>)</big><a class="headerlink" href="#kombu.messaging.Producer.revive" title="Permalink to this definition">¶</a></dt> +<dd><p>Revive the producer after connection loss.</p> +</dd></dl> + +</dd></dl> + +</div> +<div class="section" id="message-consumer"> +<h2><a class="toc-backref" href="#id2">Message Consumer</a><a class="headerlink" href="#message-consumer" title="Permalink to this headline">¶</a></h2> +<dl class="class"> <dt id="kombu.messaging.Consumer"> <em class="property">class </em><tt class="descclassname">kombu.messaging.</tt><tt class="descname">Consumer</tt><big>(</big><em>channel</em>, <em>queues</em>, <em>no_ack=None</em>, <em>auto_declare=None</em>, <em>callbacks=None</em>, <em>on_decode_error=None</em><big>)</big><a class="headerlink" href="#kombu.messaging.Consumer" title="Permalink to this definition">¶</a></dt> <dd><p>Message consumer.</p> @@ -70,7 +337,7 @@ </tbody> </table> <p>:param queues see <a class="reference internal" href="#kombu.messaging.Consumer.queues" title="kombu.messaging.Consumer.queues"><tt class="xref py py-attr docutils literal"><span class="pre">queues</span></tt></a>. -:keyword no_ack: see <tt class="xref py py-attr docutils literal"><span class="pre">no_ack</span></tt>. +:keyword no_ack: see <a class="reference internal" href="#kombu.messaging.Consumer.no_ack" title="kombu.messaging.Consumer.no_ack"><tt class="xref py py-attr docutils literal"><span class="pre">no_ack</span></tt></a>. :keyword auto_declare: see <a class="reference internal" href="#kombu.messaging.Consumer.auto_declare" title="kombu.messaging.Consumer.auto_declare"><tt class="xref py py-attr docutils literal"><span class="pre">auto_declare</span></tt></a> :keyword callbacks: see <a class="reference internal" href="#kombu.messaging.Consumer.callbacks" title="kombu.messaging.Consumer.callbacks"><tt class="xref py py-attr docutils literal"><span class="pre">callbacks</span></tt></a>. :keyword on_decode_error: see <a class="reference internal" href="#kombu.messaging.Consumer.on_decode_error" title="kombu.messaging.Consumer.on_decode_error"><tt class="xref py py-attr docutils literal"><span class="pre">on_decode_error</span></tt></a>.</p> @@ -88,10 +355,17 @@ consume from.</p> </dd></dl> <dl class="attribute"> +<dt id="kombu.messaging.Consumer.no_ack"> +<tt class="descname">no_ack</tt><a class="headerlink" href="#kombu.messaging.Consumer.no_ack" title="Permalink to this definition">¶</a></dt> +<dd><p>Flag for message acknowledgment disabled/enabled. +Enabled by default.</p> +</dd></dl> + +<dl class="attribute"> <dt id="kombu.messaging.Consumer.auto_declare"> <tt class="descname">auto_declare</tt><a class="headerlink" href="#kombu.messaging.Consumer.auto_declare" title="Permalink to this definition">¶</a></dt> -<dd><p>By default the entities will be declared at instantiation, -if you want to handle this manually you can set this to <tt class="xref docutils literal"><span class="pre">False</span></tt>.</p> +<dd><p>By default all entities will be declared at instantiation, if you +want to handle this manually you can set this to <tt class="xref py py-const xref docutils literal"><span class="pre">False</span></tt>.</p> </dd></dl> <dl class="attribute"> @@ -99,8 +373,8 @@ if you want to handle this manually you can set this to <tt class="xref docutils <tt class="descname">callbacks</tt><a class="headerlink" href="#kombu.messaging.Consumer.callbacks" title="Permalink to this definition">¶</a></dt> <dd><p>List of callbacks called in order when a message is received.</p> <p>The signature of the callbacks must take two arguments: -<tt class="docutils literal"><span class="pre">(body,</span> <span class="pre">message)</span></tt>, which is the decoded message body and -the <tt class="docutils literal"><span class="pre">Message</span></tt> instance (a subclass of +<cite>(body, message)</cite>, which is the decoded message body and +the <cite>Message</cite> instance (a subclass of <a class="reference internal" href="kombu.transport.base.html#kombu.transport.base.Message" title="kombu.transport.base.Message"><tt class="xref py py-class docutils literal"><span class="pre">Message</span></tt></a>).</p> </dd></dl> @@ -108,12 +382,37 @@ the <tt class="docutils literal"><span class="pre">Message</span></tt> instance <dt id="kombu.messaging.Consumer.on_decode_error"> <tt class="descname">on_decode_error</tt><a class="headerlink" href="#kombu.messaging.Consumer.on_decode_error" title="Permalink to this definition">¶</a></dt> <dd><p>Callback called when a message can’t be decoded.</p> -<p>The signature of the callback must take two arguments: <tt class="docutils literal"><span class="pre">(message,</span> -<span class="pre">exc)</span></tt>, which is the message that can’t be decoded and the exception +<p>The signature of the callback must take two arguments: <cite>(message, +exc)</cite>, which is the message that can’t be decoded and the exception that occured while trying to decode it.</p> </dd></dl> <dl class="method"> +<dt id="kombu.messaging.Consumer.declare"> +<tt class="descname">declare</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.messaging.Consumer.declare" title="Permalink to this definition">¶</a></dt> +<dd><p>Declare queues, exchanges and bindings.</p> +<p>This is done automatically at instantiation if <a class="reference internal" href="#kombu.messaging.Consumer.auto_declare" title="kombu.messaging.Consumer.auto_declare"><tt class="xref py py-attr docutils literal"><span class="pre">auto_declare</span></tt></a> +is set.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.messaging.Consumer.register_callback"> +<tt class="descname">register_callback</tt><big>(</big><em>callback</em><big>)</big><a class="headerlink" href="#kombu.messaging.Consumer.register_callback" title="Permalink to this definition">¶</a></dt> +<dd><p>Register a new callback to be called when a message +is received.</p> +<p>The signature of the callback needs to accept two arguments: +<cite>(body, message)</cite>, which is the decoded message body +and the <cite>Message</cite> instance (a subclass of +<a class="reference internal" href="kombu.transport.base.html#kombu.transport.base.Message" title="kombu.transport.base.Message"><tt class="xref py py-class docutils literal"><span class="pre">Message</span></tt></a>.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.messaging.Consumer.consume"> +<tt class="descname">consume</tt><big>(</big><em>no_ack=None</em><big>)</big><a class="headerlink" href="#kombu.messaging.Consumer.consume" title="Permalink to this definition">¶</a></dt> +<dd><p>Register consumer on server.</p> +</dd></dl> + +<dl class="method"> <dt id="kombu.messaging.Consumer.cancel"> <tt class="descname">cancel</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.messaging.Consumer.cancel" title="Permalink to this definition">¶</a></dt> <dd><p>End all active queue consumers.</p> @@ -124,20 +423,18 @@ mean the server will not send any more messages for this consumer.</p> <dl class="method"> <dt id="kombu.messaging.Consumer.cancel_by_queue"> <tt class="descname">cancel_by_queue</tt><big>(</big><em>queue</em><big>)</big><a class="headerlink" href="#kombu.messaging.Consumer.cancel_by_queue" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -<dl class="method"> -<dt id="kombu.messaging.Consumer.consume"> -<tt class="descname">consume</tt><big>(</big><em>no_ack=None</em><big>)</big><a class="headerlink" href="#kombu.messaging.Consumer.consume" title="Permalink to this definition">¶</a></dt> -<dd><p>Register consumer on server.</p> +<dd><p>Cancel consumer by queue name.</p> </dd></dl> <dl class="method"> -<dt id="kombu.messaging.Consumer.declare"> -<tt class="descname">declare</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.messaging.Consumer.declare" title="Permalink to this definition">¶</a></dt> -<dd><p>Declare queues, exchanges and bindings.</p> -<p>This is done automatically at instantiation if <a class="reference internal" href="#kombu.messaging.Consumer.auto_declare" title="kombu.messaging.Consumer.auto_declare"><tt class="xref py py-attr docutils literal"><span class="pre">auto_declare</span></tt></a> -is set.</p> +<dt id="kombu.messaging.Consumer.purge"> +<tt class="descname">purge</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.messaging.Consumer.purge" title="Permalink to this definition">¶</a></dt> +<dd><p>Purge messages from all queues.</p> +<div class="admonition warning"> +<p class="first admonition-title">Warning</p> +<p class="last">This will <em>delete all ready messages</em>, there is no +undo operation available.</p> +</div> </dd></dl> <dl class="method"> @@ -153,14 +450,6 @@ until flow is reactivated.</p> </dd></dl> <dl class="method"> -<dt id="kombu.messaging.Consumer.purge"> -<tt class="descname">purge</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.messaging.Consumer.purge" title="Permalink to this definition">¶</a></dt> -<dd><p>Purge messages from all queues.</p> -<p><strong>WARNING</strong>: This will <em>delete all ready messages</em>, there is no -undo operation available.</p> -</dd></dl> - -<dl class="method"> <dt id="kombu.messaging.Consumer.qos"> <tt class="descname">qos</tt><big>(</big><em>prefetch_size=0</em>, <em>prefetch_count=0</em>, <em>apply_global=False</em><big>)</big><a class="headerlink" href="#kombu.messaging.Consumer.qos" title="Permalink to this definition">¶</a></dt> <dd><p>Specify quality of service.</p> @@ -169,7 +458,7 @@ advance so that when the client finishes processing a message, the following message is already held locally, rather than needing to be sent down the channel. Prefetching gives a performance improvement.</p> -<p>The prefetch window is Ignored if the <tt class="xref py py-attr docutils literal"><span class="pre">no_ack</span></tt> option is set.</p> +<p>The prefetch window is Ignored if the <a class="reference internal" href="#kombu.messaging.Consumer.no_ack" title="kombu.messaging.Consumer.no_ack"><tt class="xref py py-attr docutils literal"><span class="pre">no_ack</span></tt></a> option is set.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> @@ -193,30 +482,6 @@ Currently not supported by RabbitMQ.</li> </dd></dl> <dl class="method"> -<dt id="kombu.messaging.Consumer.receive"> -<tt class="descname">receive</tt><big>(</big><em>body</em>, <em>message</em><big>)</big><a class="headerlink" href="#kombu.messaging.Consumer.receive" title="Permalink to this definition">¶</a></dt> -<dd><p>Method called when a message is received.</p> -<p>This dispatches to the registered <a class="reference internal" href="#kombu.messaging.Consumer.callbacks" title="kombu.messaging.Consumer.callbacks"><tt class="xref py py-attr docutils literal"><span class="pre">callbacks</span></tt></a>.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> -<li><strong>body</strong> – The decoded message body.</li> -<li><strong>message</strong> – The <tt class="docutils literal"><span class="pre">Message</span></tt> instance.</li> -</ul> -</td> -</tr> -<tr class="field"><th class="field-name" colspan="2">Raises NotImplementedError:</th></tr> -<tr><td> </td><td class="field-body"><p class="first last">If no consumer callbacks have been -registered.</p> -</td> -</tr> -</tbody> -</table> -</dd></dl> - -<dl class="method"> <dt id="kombu.messaging.Consumer.recover"> <tt class="descname">recover</tt><big>(</big><em>requeue=False</em><big>)</big><a class="headerlink" href="#kombu.messaging.Consumer.recover" title="Permalink to this definition">¶</a></dt> <dd><p>Redeliver unacknowledged messages.</p> @@ -228,7 +493,7 @@ on the specified channel.</p> <tbody valign="top"> <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> <li><strong>requeue</strong> – By default the messages will be redelivered -to the original recipient. With <tt class="docutils literal"><span class="pre">requeue</span></tt> set to true, the +to the original recipient. With <cite>requeue</cite> set to true, the server will attempt to requeue the message, potentially then delivering it to an alternative subscriber.</li> </ul> @@ -239,115 +504,39 @@ delivering it to an alternative subscriber.</li> </dd></dl> <dl class="method"> -<dt id="kombu.messaging.Consumer.register_callback"> -<tt class="descname">register_callback</tt><big>(</big><em>callback</em><big>)</big><a class="headerlink" href="#kombu.messaging.Consumer.register_callback" title="Permalink to this definition">¶</a></dt> -<dd><p>Register a new callback to be called when a message -is received.</p> -<p>The signature of the callback needs to accept two arguments: -<tt class="docutils literal"><span class="pre">(body,</span> <span class="pre">message)</span></tt>, which is the decoded message body -and the <tt class="docutils literal"><span class="pre">Message</span></tt> instance (a subclass of -<a class="reference internal" href="kombu.transport.base.html#kombu.transport.base.Message" title="kombu.transport.base.Message"><tt class="xref py py-class docutils literal"><span class="pre">Message</span></tt></a>.</p> -</dd></dl> - -</dd></dl> - -<dl class="class"> -<dt id="kombu.messaging.Producer"> -<em class="property">class </em><tt class="descclassname">kombu.messaging.</tt><tt class="descname">Producer</tt><big>(</big><em>channel</em>, <em>exchange=None</em>, <em>routing_key=None</em>, <em>serializer=None</em>, <em>auto_declare=None</em>, <em>compression=None</em>, <em>on_return=None</em><big>)</big><a class="headerlink" href="#kombu.messaging.Producer" title="Permalink to this definition">¶</a></dt> -<dd><p>Message Producer.</p> +<dt id="kombu.messaging.Consumer.receive"> +<tt class="descname">receive</tt><big>(</big><em>body</em>, <em>message</em><big>)</big><a class="headerlink" href="#kombu.messaging.Consumer.receive" title="Permalink to this definition">¶</a></dt> +<dd><p>Method called when a message is received.</p> +<p>This dispatches to the registered <a class="reference internal" href="#kombu.messaging.Consumer.callbacks" title="kombu.messaging.Consumer.callbacks"><tt class="xref py py-attr docutils literal"><span class="pre">callbacks</span></tt></a>.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> -<li><strong>channel</strong> – Connection channel.</li> -<li><strong>exchange</strong> – Exchange to publish to.</li> -<li><strong>routing_key</strong> – Default routing key.</li> -<li><strong>serializer</strong> – Default serializer. Default is <tt class="docutils literal"><span class="pre">"json"</span></tt>.</li> -<li><strong>compression</strong> – Default compression method. Default is no -compression.</li> -<li><strong>auto_declare</strong> – Automatically declare the exchange -at instantiation. Default is <tt class="xref docutils literal"><span class="pre">True</span></tt>.</li> -<li><strong>on_return</strong> – Callback to call for undeliverable messages, -when <tt class="docutils literal"><span class="pre">mandatory</span></tt> or <tt class="docutils literal"><span class="pre">imediate</span></tt> is used. This callback -needs the following signature: -<tt class="docutils literal"><span class="pre">(exception,</span> <span class="pre">exchange,</span> <span class="pre">routing_key,</span> <span class="pre">message)</span></tt>.</li> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>body</strong> – The decoded message body.</li> +<li><strong>message</strong> – The <cite>Message</cite> instance.</li> </ul> </td> </tr> +<tr class="field"><th class="field-name" colspan="2">Raises NotImplementedError:</th></tr> +<tr><td> </td><td class="field-body"><p class="first last">If no consumer callbacks have been +registered.</p> +</td> +</tr> </tbody> </table> -<dl class="attribute"> -<dt id="kombu.messaging.Producer.channel"> -<tt class="descname">channel</tt><a class="headerlink" href="#kombu.messaging.Producer.channel" title="Permalink to this definition">¶</a></dt> -<dd><p>The connection channel to use.</p> -</dd></dl> - -<dl class="attribute"> -<dt id="kombu.messaging.Producer.exchange"> -<tt class="descname">exchange</tt><a class="headerlink" href="#kombu.messaging.Producer.exchange" title="Permalink to this definition">¶</a></dt> -<dd><p>Exchange to publish to.</p> -</dd></dl> - -<dl class="attribute"> -<dt id="kombu.messaging.Producer.routing_key"> -<tt class="descname">routing_key</tt><a class="headerlink" href="#kombu.messaging.Producer.routing_key" title="Permalink to this definition">¶</a></dt> -<dd><p>Default routing key.</p> -</dd></dl> - -<dl class="attribute"> -<dt id="kombu.messaging.Producer.serializer"> -<tt class="descname">serializer</tt><a class="headerlink" href="#kombu.messaging.Producer.serializer" title="Permalink to this definition">¶</a></dt> -<dd><p>Default serializer to use. Default is autodetect.</p> -</dd></dl> - -<dl class="attribute"> -<dt id="kombu.messaging.Producer.auto_declare"> -<tt class="descname">auto_declare</tt><a class="headerlink" href="#kombu.messaging.Producer.auto_declare" title="Permalink to this definition">¶</a></dt> -<dd><p>By default the exchange is declared at instantiation. -If you want to declare manually you can set this to <tt class="xref docutils literal"><span class="pre">False</span></tt>.</p> -</dd></dl> - -<dl class="method"> -<dt id="kombu.messaging.Producer.declare"> -<tt class="descname">declare</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.messaging.Producer.declare" title="Permalink to this definition">¶</a></dt> -<dd><p>Declare the exchange.</p> -<p>This is done automatically at instantiation if <a class="reference internal" href="#kombu.messaging.Producer.auto_declare" title="kombu.messaging.Producer.auto_declare"><tt class="xref py py-attr docutils literal"><span class="pre">auto_declare</span></tt></a> -is set.</p> </dd></dl> <dl class="method"> -<dt id="kombu.messaging.Producer.publish"> -<tt class="descname">publish</tt><big>(</big><em>body</em>, <em>routing_key=None</em>, <em>delivery_mode=None</em>, <em>mandatory=False</em>, <em>immediate=False</em>, <em>priority=0</em>, <em>content_type=None</em>, <em>content_encoding=None</em>, <em>serializer=None</em>, <em>headers=None</em>, <em>compression=None</em>, <em>exchange=None</em><big>)</big><a class="headerlink" href="#kombu.messaging.Producer.publish" title="Permalink to this definition">¶</a></dt> -<dd><p>Publish message to the specified exchange.</p> -<table class="docutils field-list" frame="void" rules="none"> -<col class="field-name" /> -<col class="field-body" /> -<tbody valign="top"> -<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> -<li><strong>body</strong> – Message body.</li> -<li><strong>routing_key</strong> – Message routing key.</li> -<li><strong>delivery_mode</strong> – See <tt class="xref py py-attr docutils literal"><span class="pre">delivery_mode</span></tt>.</li> -<li><strong>mandatory</strong> – Currently not supported.</li> -<li><strong>immediate</strong> – Currently not supported.</li> -<li><strong>priority</strong> – Message priority. A number between 0 and 9.</li> -<li><strong>content_type</strong> – Content type. Default is autodetect.</li> -<li><strong>content_encoding</strong> – Content encoding. Default is autodetect.</li> -<li><strong>serializer</strong> – Serializer to use. Default is autodetect.</li> -<li><strong>headers</strong> – Mapping of arbitrary headers to pass along -with the message body.</li> -<li><strong>exchange</strong> – Override the exchange. Note that this exchange -must have been declared.</li> -</ul> -</td> -</tr> -</tbody> -</table> +<dt id="kombu.messaging.Consumer.revive"> +<tt class="descname">revive</tt><big>(</big><em>channel</em><big>)</big><a class="headerlink" href="#kombu.messaging.Consumer.revive" title="Permalink to this definition">¶</a></dt> +<dd><p>Revive consumer after connection loss.</p> </dd></dl> </dd></dl> </div> +</div> </div> @@ -357,12 +546,21 @@ must have been declared.</li> <div class="sphinxsidebarwrapper"><p class="logo"><a href="../index.html"> <img class="logo" width="128" height="128" src="http://cloud.github.com/downloads/ask/kombu/kombusmall.jpg" alt="Logo"/> </a></p> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">kombu.messaging</a><ul> +<li><a class="reference internal" href="#message-producer">Message Producer</a></li> +<li><a class="reference internal" href="#message-consumer">Message Consumer</a></li> +</ul> +</li> +</ul> + <h4>Previous topic</h4> <p class="topless"><a href="kombu.simple.html" - title="previous chapter">Simple Interface - kombu.simple</a></p> + title="previous chapter">kombu.simple</a></p> <h4>Next topic</h4> <p class="topless"><a href="kombu.entity.html" - title="next chapter">AMQP Entities - kombu.entity</a></p> + title="next chapter">kombu.entity</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../sources/reference/kombu.messaging.txt" @@ -395,18 +593,18 @@ must have been declared.</li> <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.entity.html" title="AMQP Entities - kombu.entity" + <a href="kombu.entity.html" title="kombu.entity" >next</a> |</li> <li class="right" > - <a href="kombu.simple.html" title="Simple Interface - kombu.simple" + <a href="kombu.simple.html" title="kombu.simple" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.pidbox.html b/reference/kombu.pidbox.html index d76e990a..451586ac 100644 --- a/reference/kombu.pidbox.html +++ b/reference/kombu.pidbox.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Process Mailbox - kombu.pidbox — Kombu v0.9.0 documentation</title> + <title>kombu.pidbox — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,10 +21,10 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> - <link rel="next" title="Exceptions - kombu.exceptions" href="kombu.exceptions.html" /> - <link rel="prev" title="Carrot Compatible API - kombu.compat" href="kombu.compat.html" /> + <link rel="next" title="kombu.exceptions" href="kombu.exceptions.html" /> + <link rel="prev" title="kombu.compat" href="kombu.compat.html" /> </head> <body> <div class="related"> @@ -37,12 +37,12 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.exceptions.html" title="Exceptions - kombu.exceptions" + <a href="kombu.exceptions.html" title="kombu.exceptions" accesskey="N">next</a> |</li> <li class="right" > - <a href="kombu.compat.html" title="Carrot Compatible API - kombu.compat" + <a href="kombu.compat.html" title="kombu.compat" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -52,17 +52,39 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="process-mailbox-kombu-pidbox"> -<h1>Process Mailbox - kombu.pidbox<a class="headerlink" href="#process-mailbox-kombu-pidbox" title="Permalink to this headline">¶</a></h1> + <span class="target" id="module-kombu.pidbox"></span><div class="section" id="kombu-pidbox"> +<h1>kombu.pidbox<a class="headerlink" href="#kombu-pidbox" title="Permalink to this headline">¶</a></h1> +<p>Generic process mailbox.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3"> +<li>2009 - 2010 by Ask Solem.</li> +</ol> +</td> +</tr> +<tr class="field"><th class="field-name">license:</th><td class="field-body"><p class="first last">BSD, see LICENSE for more details.</p> +</td> +</tr> +</tbody> +</table> <div class="contents local topic" id="contents"> <ul class="simple"> -<li><a class="reference external" href="#creating-the-applications-mailbox" id="id1">Creating the applications Mailbox</a></li> -<li><a class="reference external" href="#example-node" id="id2">Example Node</a></li> -<li><a class="reference external" href="#example-client" id="id3">Example Client</a></li> +<li><a class="reference internal" href="#introduction" id="id1">Introduction</a><ul> +<li><a class="reference internal" href="#creating-the-applications-mailbox" id="id2">Creating the applications Mailbox</a></li> +<li><a class="reference internal" href="#example-node" id="id3">Example Node</a></li> +<li><a class="reference internal" href="#example-client" id="id4">Example Client</a></li> +</ul> +</li> +<li><a class="reference internal" href="#mailbox" id="id5">Mailbox</a></li> +<li><a class="reference internal" href="#node" id="id6">Node</a></li> </ul> </div> -<span class="target" id="module-kombu.pidbox"></span><div class="section" id="creating-the-applications-mailbox"> -<h2><a class="toc-backref" href="#id1">Creating the applications Mailbox</a><a class="headerlink" href="#creating-the-applications-mailbox" title="Permalink to this headline">¶</a></h2> +<div class="section" id="introduction"> +<h2><a class="toc-backref" href="#id1">Introduction</a><a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2> +<div class="section" id="creating-the-applications-mailbox"> +<h3><a class="toc-backref" href="#id2">Creating the applications Mailbox</a><a class="headerlink" href="#creating-the-applications-mailbox" title="Permalink to this headline">¶</a></h3> <div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">mailbox</span> <span class="o">=</span> <span class="n">pidbox</span><span class="o">.</span><span class="n">Mailbox</span><span class="p">(</span><span class="s">"celerybeat"</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="s">"direct"</span><span class="p">)</span> <span class="gp">>>> </span><span class="nd">@mailbox.handler</span> @@ -76,12 +98,10 @@ </div> </div> <div class="section" id="example-node"> -<h2><a class="toc-backref" href="#id2">Example Node</a><a class="headerlink" href="#example-node" title="Permalink to this headline">¶</a></h2> -<dl class="docutils"> -<dt>::</dt> -<dd><div class="first last highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">connection</span> <span class="o">=</span> <span class="n">kombu</span><span class="o">.</span><span class="n">BrokerConnection</span><span class="p">()</span> +<h3><a class="toc-backref" href="#id3">Example Node</a><a class="headerlink" href="#example-node" title="Permalink to this headline">¶</a></h3> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">connection</span> <span class="o">=</span> <span class="n">kombu</span><span class="o">.</span><span class="n">BrokerConnection</span><span class="p">()</span> <span class="gp">>>> </span><span class="n">state</span> <span class="o">=</span> <span class="p">{</span><span class="s">"beat"</span><span class="p">:</span> <span class="n">beat</span><span class="p">,</span> -<span class="go"> "connection: connection}</span> +<span class="go"> "connection": connection}</span> <span class="gp">>>> </span><span class="n">consumer</span> <span class="o">=</span> <span class="n">mailbox</span><span class="p">(</span><span class="n">connection</span><span class="p">)</span><span class="o">.</span><span class="n">Node</span><span class="p">(</span><span class="n">hostname</span><span class="p">)</span><span class="o">.</span><span class="n">listen</span><span class="p">()</span> <span class="gp">>>> </span><span class="k">try</span><span class="p">:</span> <span class="gp">... </span> <span class="k">while</span> <span class="bp">True</span><span class="p">:</span> @@ -90,30 +110,53 @@ <span class="gp">... </span> <span class="n">consumer</span><span class="o">.</span><span class="n">cancel</span><span class="p">()</span> </pre></div> </div> -</dd> -</dl> </div> <div class="section" id="example-client"> -<h2><a class="toc-backref" href="#id3">Example Client</a><a class="headerlink" href="#example-client" title="Permalink to this headline">¶</a></h2> -<dl class="docutils"> -<dt>::</dt> -<dd><div class="first last highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">mailbox</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="s">"reload_schedule"</span><span class="p">)</span> <span class="c"># cast is async.</span> +<h3><a class="toc-backref" href="#id4">Example Client</a><a class="headerlink" href="#example-client" title="Permalink to this headline">¶</a></h3> +<div class="highlight-python"><div class="highlight"><pre><span class="gp">>>> </span><span class="n">mailbox</span><span class="o">.</span><span class="n">cast</span><span class="p">(</span><span class="s">"reload_schedule"</span><span class="p">)</span> <span class="c"># cast is async.</span> <span class="gp">>>> </span><span class="n">info</span> <span class="o">=</span> <span class="n">celerybeat</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="s">"connection_info"</span><span class="p">,</span> <span class="n">timeout</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span> </pre></div> </div> -</dd> -</dl> +</div> +</div> +<div class="section" id="mailbox"> +<h2><a class="toc-backref" href="#id5">Mailbox</a><a class="headerlink" href="#mailbox" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="kombu.pidbox.Mailbox"> <em class="property">class </em><tt class="descclassname">kombu.pidbox.</tt><tt class="descname">Mailbox</tt><big>(</big><em>namespace</em>, <em>type='direct'</em>, <em>connection=None</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Mailbox" title="Permalink to this definition">¶</a></dt> -<dd><dl class="method"> -<dt id="kombu.pidbox.Mailbox.Node"> -<tt class="descname">Node</tt><big>(</big><em>hostname=None</em>, <em>state=None</em>, <em>channel=None</em>, <em>handlers=None</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Mailbox.Node" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dd><dl class="attribute"> +<dt id="kombu.pidbox.Mailbox.namespace"> +<tt class="descname">namespace</tt><a class="headerlink" href="#kombu.pidbox.Mailbox.namespace" title="Permalink to this definition">¶</a></dt> +<dd><p>Name of application.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.pidbox.Mailbox.connection"> +<tt class="descname">connection</tt><a class="headerlink" href="#kombu.pidbox.Mailbox.connection" title="Permalink to this definition">¶</a></dt> +<dd><p>Connection (if bound).</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.pidbox.Mailbox.type"> +<tt class="descname">type</tt><a class="headerlink" href="#kombu.pidbox.Mailbox.type" title="Permalink to this definition">¶</a></dt> +<dd><p>Exchange type (usually direct, or fanout for broadcast).</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.pidbox.Mailbox.exchange"> +<tt class="descname">exchange</tt><a class="headerlink" href="#kombu.pidbox.Mailbox.exchange" title="Permalink to this definition">¶</a></dt> +<dd><p>mailbox exchange (init by constructor).</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.pidbox.Mailbox.reply_exchange"> +<tt class="descname">reply_exchange</tt><a class="headerlink" href="#kombu.pidbox.Mailbox.reply_exchange" title="Permalink to this definition">¶</a></dt> +<dd><p>exchange to send replies to.</p> +</dd></dl> <dl class="method"> -<dt id="kombu.pidbox.Mailbox.abcast"> -<tt class="descname">abcast</tt><big>(</big><em>command</em>, <em>kwargs={}</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Mailbox.abcast" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.pidbox.Mailbox.Node"> +<tt class="descname">Node</tt><big>(</big><em>hostname=None</em>, <em>state=None</em>, <em>channel=None</em>, <em>handlers=None</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Mailbox.Node" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="method"> @@ -127,8 +170,13 @@ <dd></dd></dl> <dl class="method"> -<dt id="kombu.pidbox.Mailbox.get_queue"> -<tt class="descname">get_queue</tt><big>(</big><em>hostname</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Mailbox.get_queue" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.pidbox.Mailbox.abcast"> +<tt class="descname">abcast</tt><big>(</big><em>command</em>, <em>kwargs={}</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Mailbox.abcast" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="kombu.pidbox.Mailbox.multi_call"> +<tt class="descname">multi_call</tt><big>(</big><em>command</em>, <em>kwargs={}</em>, <em>timeout=1</em>, <em>limit=None</em>, <em>callback=None</em>, <em>channel=None</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Mailbox.multi_call" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="method"> @@ -137,27 +185,64 @@ <dd></dd></dl> <dl class="method"> -<dt id="kombu.pidbox.Mailbox.multi_call"> -<tt class="descname">multi_call</tt><big>(</big><em>command</em>, <em>kwargs={}</em>, <em>timeout=1</em>, <em>limit=None</em>, <em>callback=None</em>, <em>channel=None</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Mailbox.multi_call" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.pidbox.Mailbox.get_queue"> +<tt class="descname">get_queue</tt><big>(</big><em>hostname</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Mailbox.get_queue" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> -<dl class="attribute"> -<dt id="kombu.pidbox.Mailbox.node_cls"> -<tt class="descname">node_cls</tt><a class="headerlink" href="#kombu.pidbox.Mailbox.node_cls" title="Permalink to this definition">¶</a></dt> -<dd><p>alias of <a class="reference internal" href="#kombu.pidbox.Node" title="kombu.pidbox.Node"><tt class="xref py py-class docutils literal"><span class="pre">Node</span></tt></a></p> -</dd></dl> - </dd></dl> +</div> +<div class="section" id="node"> +<h2><a class="toc-backref" href="#id6">Node</a><a class="headerlink" href="#node" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="kombu.pidbox.Node"> <em class="property">class </em><tt class="descclassname">kombu.pidbox.</tt><tt class="descname">Node</tt><big>(</big><em>hostname</em>, <em>state=None</em>, <em>channel=None</em>, <em>handlers=None</em>, <em>mailbox=None</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Node" title="Permalink to this definition">¶</a></dt> -<dd><dl class="method"> +<dd><dl class="attribute"> +<dt id="kombu.pidbox.Node.hostname"> +<tt class="descname">hostname</tt><a class="headerlink" href="#kombu.pidbox.Node.hostname" title="Permalink to this definition">¶</a></dt> +<dd><p>hostname of the node.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.pidbox.Node.mailbox"> +<tt class="descname">mailbox</tt><a class="headerlink" href="#kombu.pidbox.Node.mailbox" title="Permalink to this definition">¶</a></dt> +<dd><p>the <a class="reference internal" href="#kombu.pidbox.Mailbox" title="kombu.pidbox.Mailbox"><tt class="xref py py-class docutils literal"><span class="pre">Mailbox</span></tt></a> this is a node for.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.pidbox.Node.handlers"> +<tt class="descname">handlers</tt><a class="headerlink" href="#kombu.pidbox.Node.handlers" title="Permalink to this definition">¶</a></dt> +<dd><p>map of method name/handlers.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.pidbox.Node.state"> +<tt class="descname">state</tt><a class="headerlink" href="#kombu.pidbox.Node.state" title="Permalink to this definition">¶</a></dt> +<dd><p>current context (passed on to handlers)</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.pidbox.Node.channel"> +<tt class="descname">channel</tt><a class="headerlink" href="#kombu.pidbox.Node.channel" title="Permalink to this definition">¶</a></dt> +<dd><p>current channel.</p> +</dd></dl> + +<dl class="method"> <dt id="kombu.pidbox.Node.Consumer"> <tt class="descname">Consumer</tt><big>(</big><em>channel=None</em>, <em>**options</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Node.Consumer" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="method"> +<dt id="kombu.pidbox.Node.handler"> +<tt class="descname">handler</tt><big>(</big><em>fun</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Node.handler" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="kombu.pidbox.Node.listen"> +<tt class="descname">listen</tt><big>(</big><em>channel=None</em>, <em>callback=None</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Node.listen" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> <dt id="kombu.pidbox.Node.dispatch"> <tt class="descname">dispatch</tt><big>(</big><em>method</em>, <em>arguments=None</em>, <em>reply_to=None</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Node.dispatch" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> @@ -168,11 +253,6 @@ <dd></dd></dl> <dl class="method"> -<dt id="kombu.pidbox.Node.handle"> -<tt class="descname">handle</tt><big>(</big><em>method</em>, <em>arguments={}</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Node.handle" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -<dl class="method"> <dt id="kombu.pidbox.Node.handle_call"> <tt class="descname">handle_call</tt><big>(</big><em>method</em>, <em>arguments</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Node.handle_call" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> @@ -183,18 +263,13 @@ <dd></dd></dl> <dl class="method"> -<dt id="kombu.pidbox.Node.handle_message"> -<tt class="descname">handle_message</tt><big>(</big><em>message_data</em>, <em>message</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Node.handle_message" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -<dl class="method"> -<dt id="kombu.pidbox.Node.handler"> -<tt class="descname">handler</tt><big>(</big><em>fun</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Node.handler" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.pidbox.Node.handle"> +<tt class="descname">handle</tt><big>(</big><em>method</em>, <em>arguments={}</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Node.handle" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="method"> -<dt id="kombu.pidbox.Node.listen"> -<tt class="descname">listen</tt><big>(</big><em>channel=None</em>, <em>callback=None</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Node.listen" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.pidbox.Node.handle_message"> +<tt class="descname">handle_message</tt><big>(</big><em>message_data</em>, <em>message</em><big>)</big><a class="headerlink" href="#kombu.pidbox.Node.handle_message" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="method"> @@ -217,20 +292,25 @@ </a></p> <h3><a href="../index.html">Table Of Contents</a></h3> <ul> -<li><a class="reference internal" href="#">Process Mailbox - kombu.pidbox</a><ul> +<li><a class="reference internal" href="#">kombu.pidbox</a><ul> +<li><a class="reference internal" href="#introduction">Introduction</a><ul> <li><a class="reference internal" href="#creating-the-applications-mailbox">Creating the applications Mailbox</a></li> <li><a class="reference internal" href="#example-node">Example Node</a></li> <li><a class="reference internal" href="#example-client">Example Client</a></li> </ul> </li> +<li><a class="reference internal" href="#mailbox">Mailbox</a></li> +<li><a class="reference internal" href="#node">Node</a></li> +</ul> +</li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="kombu.compat.html" - title="previous chapter">Carrot Compatible API - kombu.compat</a></p> + title="previous chapter">kombu.compat</a></p> <h4>Next topic</h4> <p class="topless"><a href="kombu.exceptions.html" - title="next chapter">Exceptions - kombu.exceptions</a></p> + title="next chapter">kombu.exceptions</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../sources/reference/kombu.pidbox.txt" @@ -263,18 +343,18 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.exceptions.html" title="Exceptions - kombu.exceptions" + <a href="kombu.exceptions.html" title="kombu.exceptions" >next</a> |</li> <li class="right" > - <a href="kombu.compat.html" title="Carrot Compatible API - kombu.compat" + <a href="kombu.compat.html" title="kombu.compat" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.serialization.html b/reference/kombu.serialization.html index 6476f2ff..900c6046 100644 --- a/reference/kombu.serialization.html +++ b/reference/kombu.serialization.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Serialization - kombu.serialization — Kombu v0.9.0 documentation</title> + <title>kombu.serialization — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,10 +21,10 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> - <link rel="next" title="Compression - kombu.compression" href="kombu.compression.html" /> - <link rel="prev" title="Virtual Transport Interface - kombu.transport.virtual" href="kombu.transport.virtual.html" /> + <link rel="next" title="kombu.compression" href="kombu.compression.html" /> + <link rel="prev" title="kombu.transport.virtual.scheduling" href="kombu.transport.virtual.scheduling.html" /> </head> <body> <div class="related"> @@ -37,12 +37,12 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.compression.html" title="Compression - kombu.compression" + <a href="kombu.compression.html" title="kombu.compression" accesskey="N">next</a> |</li> <li class="right" > - <a href="kombu.transport.virtual.html" title="Virtual Transport Interface - kombu.transport.virtual" + <a href="kombu.transport.virtual.scheduling.html" title="kombu.transport.virtual.scheduling" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -52,33 +52,181 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="serialization-kombu-serialization"> -<h1>Serialization - kombu.serialization<a class="headerlink" href="#serialization-kombu-serialization" title="Permalink to this headline">¶</a></h1> -<span class="target" id="module-kombu.serialization"></span><p>Centralized support for encoding/decoding of data structures. -Requires a json library (<a class="reference external" href="http://pypi.python.org/pypi/python-cjson/">cjson</a>, <a class="reference external" href="http://code.google.com/p/simplejson/">simplejson</a>, or <a class="reference external" href="http://docs.python.org/library/json.html">Python 2.6+</a>).</p> -<p>Pickle support is built-in.</p> -<p>Optionally installs support for <tt class="docutils literal"><span class="pre">YAML</span></tt> if the <a class="reference external" href="http://pyyaml.org/">PyYAML</a> package + <span class="target" id="module-kombu.serialization"></span><div class="section" id="kombu-serialization"> +<h1>kombu.serialization<a class="headerlink" href="#kombu-serialization" title="Permalink to this headline">¶</a></h1> +<p>Serialization utilities.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3"> +<li>2009 - 2010</li> +</ol> +</td> +</tr> +<tr class="field"><th class="field-name">license:</th><td class="field-body"><p class="first last">BSD, see LICENSE for more details.</p> +</td> +</tr> +</tbody> +</table> +<div class="contents local topic" id="contents"> +<ul class="simple"> +<li><a class="reference internal" href="#overview" id="id1">Overview</a></li> +<li><a class="reference internal" href="#exceptions" id="id2">Exceptions</a></li> +<li><a class="reference internal" href="#serialization" id="id3">Serialization</a></li> +<li><a class="reference internal" href="#registry" id="id4">Registry</a></li> +</ul> +</div> +<div class="section" id="overview"> +<h2><a class="toc-backref" href="#id1">Overview</a><a class="headerlink" href="#overview" title="Permalink to this headline">¶</a></h2> +<p>Centralized support for encoding/decoding of data structures. +Contains json, pickle, msgpack, and yaml serializers.</p> +<p>Optionally installs support for YAML if the <a class="reference external" href="http://pyyaml.org/">PyYAML</a> package is installed.</p> <p>Optionally installs support for <a class="reference external" href="http://msgpack.sourceforge.net/">msgpack</a> if the <a class="reference external" href="http://pypi.python.org/pypi/msgpack-python/">msgpack-python</a> package is installed.</p> +</div> +<div class="section" id="exceptions"> +<h2><a class="toc-backref" href="#id2">Exceptions</a><a class="headerlink" href="#exceptions" title="Permalink to this headline">¶</a></h2> <dl class="exception"> <dt id="kombu.serialization.SerializerNotInstalled"> <em class="property">exception </em><tt class="descclassname">kombu.serialization.</tt><tt class="descname">SerializerNotInstalled</tt><a class="headerlink" href="#kombu.serialization.SerializerNotInstalled" title="Permalink to this definition">¶</a></dt> <dd><p>Support for the requested serialization type is not installed</p> </dd></dl> +</div> +<div class="section" id="serialization"> +<h2><a class="toc-backref" href="#id3">Serialization</a><a class="headerlink" href="#serialization" title="Permalink to this headline">¶</a></h2> +<dl class="function"> +<dt id="kombu.serialization.encode"> +<tt class="descclassname">kombu.serialization.</tt><tt class="descname">encode</tt><big>(</big><em>self</em>, <em>data</em>, <em>serializer=None</em><big>)</big><a class="headerlink" href="#kombu.serialization.encode" title="Permalink to this definition">¶</a></dt> +<dd><dl class="function"> +<dt> +<tt class="descname">decode(data, content_type, content_encoding):</tt></dt> +<dd><p>Deserialize a data stream as serialized using <cite>encode</cite> +based on <cite>content_type</cite>.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>data</strong> – The message data to deserialize.</li> +<li><strong>content_type</strong> – The content-type of the data. +(e.g., <cite>application/json</cite>).</li> +<li><strong>content_encoding</strong> – The content-encoding of the data. +(e.g., <cite>utf-8</cite>, <cite>binary</cite>, or <cite>us-ascii</cite>).</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">The unserialized data.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +</dd></dl> + +<dl class="function"> +<dt id="kombu.serialization.decode"> +<tt class="descclassname">kombu.serialization.</tt><tt class="descname">decode</tt><big>(</big><em>self</em>, <em>data</em>, <em>content_type</em>, <em>content_encoding</em><big>)</big><a class="headerlink" href="#kombu.serialization.decode" title="Permalink to this definition">¶</a></dt> +<dd><dl class="function"> +<dt> +<tt class="descname">register(name, encoder, decoder, content_type,</tt></dt> +<dt> +<tt class="descname">content_encoding="utf-8"):</tt></dt> +<dt> +<tt class="descname">Register a new encoder/decoder.</tt></dt> +<dd><table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>name</strong> – A convenience name for the serialization method.</li> +<li><strong>encoder</strong> – A method that will be passed a python data structure +and should return a string representing the serialized data. +If <tt class="xref py py-const xref docutils literal"><span class="pre">None</span></tt>, then only a decoder will be registered. Encoding +will not be possible.</li> +<li><strong>decoder</strong> – A method that will be passed a string representing +serialized data and should return a python data structure. +If <tt class="xref py py-const xref docutils literal"><span class="pre">None</span></tt>, then only an encoder will be registered. +Decoding will not be possible.</li> +<li><strong>content_type</strong> – The mime-type describing the serialized +structure.</li> +<li><strong>content_encoding</strong> – The content encoding (character set) that +the <cite>decoder</cite> method will be returning. Will usually be +utf-8`, <cite>us-ascii</cite>, or <cite>binary</cite>.</li> +</ul> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +</dd></dl> + +<dl class="function"> +<dt id="kombu.serialization.raw_encode"> +<tt class="descclassname">kombu.serialization.</tt><tt class="descname">raw_encode</tt><big>(</big><em>data</em><big>)</big><a class="headerlink" href="#kombu.serialization.raw_encode" title="Permalink to this definition">¶</a></dt> +<dd><p>Special case serializer.</p> +</dd></dl> + +</div> +<div class="section" id="registry"> +<h2><a class="toc-backref" href="#id4">Registry</a><a class="headerlink" href="#registry" title="Permalink to this headline">¶</a></h2> +<dl class="function"> +<dt id="kombu.serialization.register"> +<tt class="descclassname">kombu.serialization.</tt><tt class="descname">register</tt><big>(</big><em>self</em>, <em>name</em>, <em>encoder</em>, <em>decoder</em>, <em>content_type</em>, <em>content_encoding='utf-8'</em><big>)</big><a class="headerlink" href="#kombu.serialization.register" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + <dl class="data"> <dt id="kombu.serialization.registry"> <tt class="descclassname">kombu.serialization.</tt><tt class="descname">registry</tt><a class="headerlink" href="#kombu.serialization.registry" title="Permalink to this definition">¶</a></dt> <dd><dl class="function"> -<dt id="kombu.serialization.encode"> -<tt class="descclassname">kombu.serialization.</tt><tt class="descname">encode</tt><big>(</big><em>data</em>, <em>serializer=default_serializer</em><big>)</big><a class="headerlink" href="#kombu.serialization.encode" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt> +<tt class="descclassname">kombu.serialization.</tt><tt class="descname">encode</tt><big>(</big><em>data</em>, <em>serializer=default_serializer</em><big>)</big></dt> +<dd><p>Serialize a data structure into a string suitable for sending +as an AMQP message body.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> +<li><strong>data</strong> – The message data to send. Can be a list, +dictionary or a string.</li> +<li><strong>serializer</strong> – <p>An optional string representing +the serialization method you want the data marshalled +into. (For example, <cite>json</cite>, <cite>raw</cite>, or <cite>pickle</cite>).</p> +<p>If <tt class="xref py py-const xref docutils literal"><span class="pre">None</span></tt> (default), then json will be used, unless +<cite>data</cite> is a <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">unicode</span></tt> object. In this +latter case, no serialization occurs as it would be +unnecessary.</p> +<p>Note that if <cite>serializer</cite> is specified, then that +serialization method will be used even if a <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt> +or <tt class="xref py py-class docutils literal"><span class="pre">unicode</span></tt> object is passed in.</p> +</li> +</ul> +</td> +</tr> +<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A three-item tuple containing the content type +(e.g., <cite>application/json</cite>), content encoding, (e.g., +<cite>utf-8</cite>) and a string containing the serialized +data.</p> +</td> +</tr> +<tr class="field"><th class="field-name" colspan="2">Raises SerializerNotInstalled:</th></tr> +<tr><td> </td><td class="field-body"><p class="first last">If the serialization method +requested is not available.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> -<p>Encode data using the registry’s default encoder.</p> </dd></dl> </div> +</div> </div> @@ -88,12 +236,23 @@ package is installed.</p> <div class="sphinxsidebarwrapper"><p class="logo"><a href="../index.html"> <img class="logo" width="128" height="128" src="http://cloud.github.com/downloads/ask/kombu/kombusmall.jpg" alt="Logo"/> </a></p> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">kombu.serialization</a><ul> +<li><a class="reference internal" href="#overview">Overview</a></li> +<li><a class="reference internal" href="#exceptions">Exceptions</a></li> +<li><a class="reference internal" href="#serialization">Serialization</a></li> +<li><a class="reference internal" href="#registry">Registry</a></li> +</ul> +</li> +</ul> + <h4>Previous topic</h4> - <p class="topless"><a href="kombu.transport.virtual.html" - title="previous chapter">Virtual Transport Interface - kombu.transport.virtual</a></p> + <p class="topless"><a href="kombu.transport.virtual.scheduling.html" + title="previous chapter">kombu.transport.virtual.scheduling</a></p> <h4>Next topic</h4> <p class="topless"><a href="kombu.compression.html" - title="next chapter">Compression - kombu.compression</a></p> + title="next chapter">kombu.compression</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../sources/reference/kombu.serialization.txt" @@ -126,18 +285,18 @@ package is installed.</p> <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.compression.html" title="Compression - kombu.compression" + <a href="kombu.compression.html" title="kombu.compression" >next</a> |</li> <li class="right" > - <a href="kombu.transport.virtual.html" title="Virtual Transport Interface - kombu.transport.virtual" + <a href="kombu.transport.virtual.scheduling.html" title="kombu.transport.virtual.scheduling" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.simple.html b/reference/kombu.simple.html index 285df8ef..f54d93df 100644 --- a/reference/kombu.simple.html +++ b/reference/kombu.simple.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Simple Interface - kombu.simple — Kombu v0.9.0 documentation</title> + <title>kombu.simple — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,10 +21,10 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> - <link rel="next" title="Messaging - kombu.messaging" href="kombu.messaging.html" /> - <link rel="prev" title="Broker Connections - kombu.connection" href="kombu.connection.html" /> + <link rel="next" title="kombu.messaging" href="kombu.messaging.html" /> + <link rel="prev" title="kombu.connection" href="kombu.connection.html" /> </head> <body> <div class="related"> @@ -37,12 +37,12 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.messaging.html" title="Messaging - kombu.messaging" + <a href="kombu.messaging.html" title="kombu.messaging" accesskey="N">next</a> |</li> <li class="right" > - <a href="kombu.connection.html" title="Broker Connections - kombu.connection" + <a href="kombu.connection.html" title="kombu.connection" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -52,53 +52,203 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="simple-interface-kombu-simple"> -<h1>Simple Interface - kombu.simple<a class="headerlink" href="#simple-interface-kombu-simple" title="Permalink to this headline">¶</a></h1> -<span class="target" id="module-kombu.simple"></span><dl class="class"> -<dt id="kombu.simple.SimpleBase"> -<em class="property">class </em><tt class="descclassname">kombu.simple.</tt><tt class="descname">SimpleBase</tt><big>(</big><em>channel</em>, <em>producer</em>, <em>consumer</em>, <em>no_ack=False</em>, <em>channel_autoclose=False</em><big>)</big><a class="headerlink" href="#kombu.simple.SimpleBase" title="Permalink to this definition">¶</a></dt> -<dd><dl class="method"> -<dt id="kombu.simple.SimpleBase.clear"> -<tt class="descname">clear</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.simple.SimpleBase.clear" title="Permalink to this definition">¶</a></dt> + <span class="target" id="module-kombu.simple"></span><div class="section" id="kombu-simple"> +<h1>kombu.simple<a class="headerlink" href="#kombu-simple" title="Permalink to this headline">¶</a></h1> +<p>Simple interface.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3"> +<li>2009 - 2010 by Ask Solem.</li> +</ol> +</td> +</tr> +<tr class="field"><th class="field-name">license:</th><td class="field-body"><p class="first last">BSD, see LICENSE for more details.</p> +</td> +</tr> +</tbody> +</table> +<div class="contents local topic" id="contents"> +<ul class="simple"> +<li><a class="reference internal" href="#persistent" id="id1">Persistent</a></li> +<li><a class="reference internal" href="#buffer" id="id2">Buffer</a></li> +</ul> +</div> +<div class="section" id="persistent"> +<h2><a class="toc-backref" href="#id1">Persistent</a><a class="headerlink" href="#persistent" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="kombu.simple.SimpleQueue"> +<em class="property">class </em><tt class="descclassname">kombu.simple.</tt><tt class="descname">SimpleQueue</tt><big>(</big><em>channel</em>, <em>name</em>, <em>no_ack=None</em>, <em>queue_opts=None</em>, <em>exchange_opts=None</em>, <em>serializer=None</em>, <em>compression=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.simple.SimpleQueue" title="Permalink to this definition">¶</a></dt> +<dd><dl class="attribute"> +<dt id="kombu.simple.SimpleQueue.channel"> +<tt class="descname">channel</tt><a class="headerlink" href="#kombu.simple.SimpleQueue.channel" title="Permalink to this definition">¶</a></dt> +<dd><p>Current channel</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.simple.SimpleQueue.producer"> +<tt class="descname">producer</tt><a class="headerlink" href="#kombu.simple.SimpleQueue.producer" title="Permalink to this definition">¶</a></dt> +<dd><p><a class="reference internal" href="kombu.messaging.html#kombu.messaging.Producer" title="kombu.messaging.Producer"><tt class="xref py py-class docutils literal"><span class="pre">Producer</span></tt></a> used to publish messages.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.simple.SimpleQueue.consumer"> +<tt class="descname">consumer</tt><a class="headerlink" href="#kombu.simple.SimpleQueue.consumer" title="Permalink to this definition">¶</a></dt> +<dd><p><a class="reference internal" href="kombu.messaging.html#kombu.messaging.Consumer" title="kombu.messaging.Consumer"><tt class="xref py py-class docutils literal"><span class="pre">Consumer</span></tt></a> used to receive messages.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.simple.SimpleQueue.no_ack"> +<tt class="descname">no_ack</tt><a class="headerlink" href="#kombu.simple.SimpleQueue.no_ack" title="Permalink to this definition">¶</a></dt> +<dd><p>flag to enable/disable acknowledgements.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.simple.SimpleQueue.queue"> +<tt class="descname">queue</tt><a class="headerlink" href="#kombu.simple.SimpleQueue.queue" title="Permalink to this definition">¶</a></dt> +<dd><p><a class="reference internal" href="kombu.entity.html#kombu.entity.Queue" title="kombu.entity.Queue"><tt class="xref py py-class docutils literal"><span class="pre">Queue</span></tt></a> to consume from (if consuming).</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.simple.SimpleQueue.queue_opts"> +<tt class="descname">queue_opts</tt><a class="headerlink" href="#kombu.simple.SimpleQueue.queue_opts" title="Permalink to this definition">¶</a></dt> +<dd><blockquote> +Additional options for the queue declaration.</blockquote> +<dl class="attribute"> +<dt id="kombu.simple.SimpleQueue.exchange_opts"> +<tt class="descname">exchange_opts</tt><a class="headerlink" href="#kombu.simple.SimpleQueue.exchange_opts" title="Permalink to this definition">¶</a></dt> +<dd><p>Additional options for the exchange declaration.</p> +</dd></dl> + +</dd></dl> + +<dl class="method"> +<dt id="kombu.simple.SimpleQueue.get"> +<tt class="descname">get</tt><big>(</big><em>block=True</em>, <em>timeout=None</em>, <em>sync=False</em><big>)</big><a class="headerlink" href="#kombu.simple.SimpleQueue.get" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="method"> -<dt id="kombu.simple.SimpleBase.close"> -<tt class="descname">close</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.simple.SimpleBase.close" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.simple.SimpleQueue.get_nowait"> +<tt class="descname">get_nowait</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.simple.SimpleQueue.get_nowait" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="method"> -<dt id="kombu.simple.SimpleBase.get"> -<tt class="descname">get</tt><big>(</big><em>block=True</em>, <em>timeout=None</em>, <em>sync=False</em><big>)</big><a class="headerlink" href="#kombu.simple.SimpleBase.get" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.simple.SimpleQueue.put"> +<tt class="descname">put</tt><big>(</big><em>message</em>, <em>serializer=None</em>, <em>headers=None</em>, <em>compression=None</em>, <em>routing_key=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.simple.SimpleQueue.put" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="method"> -<dt id="kombu.simple.SimpleBase.get_nowait"> -<tt class="descname">get_nowait</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.simple.SimpleBase.get_nowait" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.simple.SimpleQueue.clear"> +<tt class="descname">clear</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.simple.SimpleQueue.clear" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="method"> -<dt id="kombu.simple.SimpleBase.put"> -<tt class="descname">put</tt><big>(</big><em>message</em>, <em>serializer=None</em>, <em>headers=None</em>, <em>compression=None</em>, <em>routing_key=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.simple.SimpleBase.put" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.simple.SimpleQueue.__len__"> +<tt class="descname">__len__</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.simple.SimpleQueue.__len__" title="Permalink to this definition">¶</a></dt> +<dd><p><cite>len(self) -> self.qsize()</cite></p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.simple.SimpleQueue.qsize"> +<tt class="descname">qsize</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.simple.SimpleQueue.qsize" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="method"> -<dt id="kombu.simple.SimpleBase.qsize"> -<tt class="descname">qsize</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.simple.SimpleBase.qsize" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.simple.SimpleQueue.close"> +<tt class="descname">close</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.simple.SimpleQueue.close" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </dd></dl> +</div> +<div class="section" id="buffer"> +<h2><a class="toc-backref" href="#id2">Buffer</a><a class="headerlink" href="#buffer" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="kombu.simple.SimpleBuffer"> <em class="property">class </em><tt class="descclassname">kombu.simple.</tt><tt class="descname">SimpleBuffer</tt><big>(</big><em>channel</em>, <em>name</em>, <em>no_ack=None</em>, <em>queue_opts=None</em>, <em>exchange_opts=None</em>, <em>serializer=None</em>, <em>compression=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.simple.SimpleBuffer" title="Permalink to this definition">¶</a></dt> +<dd><dl class="attribute"> +<dt id="kombu.simple.SimpleBuffer.channel"> +<tt class="descname">channel</tt><a class="headerlink" href="#kombu.simple.SimpleBuffer.channel" title="Permalink to this definition">¶</a></dt> +<dd><p>Current channel</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.simple.SimpleBuffer.producer"> +<tt class="descname">producer</tt><a class="headerlink" href="#kombu.simple.SimpleBuffer.producer" title="Permalink to this definition">¶</a></dt> +<dd><p><a class="reference internal" href="kombu.messaging.html#kombu.messaging.Producer" title="kombu.messaging.Producer"><tt class="xref py py-class docutils literal"><span class="pre">Producer</span></tt></a> used to publish messages.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.simple.SimpleBuffer.consumer"> +<tt class="descname">consumer</tt><a class="headerlink" href="#kombu.simple.SimpleBuffer.consumer" title="Permalink to this definition">¶</a></dt> +<dd><p><a class="reference internal" href="kombu.messaging.html#kombu.messaging.Consumer" title="kombu.messaging.Consumer"><tt class="xref py py-class docutils literal"><span class="pre">Consumer</span></tt></a> used to receive messages.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.simple.SimpleBuffer.no_ack"> +<tt class="descname">no_ack</tt><a class="headerlink" href="#kombu.simple.SimpleBuffer.no_ack" title="Permalink to this definition">¶</a></dt> +<dd><p>flag to enable/disable acknowledgements.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.simple.SimpleBuffer.queue"> +<tt class="descname">queue</tt><a class="headerlink" href="#kombu.simple.SimpleBuffer.queue" title="Permalink to this definition">¶</a></dt> +<dd><p><a class="reference internal" href="kombu.entity.html#kombu.entity.Queue" title="kombu.entity.Queue"><tt class="xref py py-class docutils literal"><span class="pre">Queue</span></tt></a> to consume from (if consuming).</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.simple.SimpleBuffer.queue_opts"> +<tt class="descname">queue_opts</tt><a class="headerlink" href="#kombu.simple.SimpleBuffer.queue_opts" title="Permalink to this definition">¶</a></dt> +<dd><blockquote> +Additional options for the queue declaration.</blockquote> +<dl class="attribute"> +<dt id="kombu.simple.SimpleBuffer.exchange_opts"> +<tt class="descname">exchange_opts</tt><a class="headerlink" href="#kombu.simple.SimpleBuffer.exchange_opts" title="Permalink to this definition">¶</a></dt> +<dd><p>Additional options for the exchange declaration.</p> +</dd></dl> + +</dd></dl> + +<dl class="method"> +<dt id="kombu.simple.SimpleBuffer.get"> +<tt class="descname">get</tt><big>(</big><em>block=True</em>, <em>timeout=None</em>, <em>sync=False</em><big>)</big><a class="headerlink" href="#kombu.simple.SimpleBuffer.get" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> -<dl class="class"> -<dt id="kombu.simple.SimpleQueue"> -<em class="property">class </em><tt class="descclassname">kombu.simple.</tt><tt class="descname">SimpleQueue</tt><big>(</big><em>channel</em>, <em>name</em>, <em>no_ack=None</em>, <em>queue_opts=None</em>, <em>exchange_opts=None</em>, <em>serializer=None</em>, <em>compression=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.simple.SimpleQueue" title="Permalink to this definition">¶</a></dt> +<dl class="method"> +<dt id="kombu.simple.SimpleBuffer.get_nowait"> +<tt class="descname">get_nowait</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.simple.SimpleBuffer.get_nowait" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="kombu.simple.SimpleBuffer.put"> +<tt class="descname">put</tt><big>(</big><em>message</em>, <em>serializer=None</em>, <em>headers=None</em>, <em>compression=None</em>, <em>routing_key=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.simple.SimpleBuffer.put" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="kombu.simple.SimpleBuffer.clear"> +<tt class="descname">clear</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.simple.SimpleBuffer.clear" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="kombu.simple.SimpleBuffer.__len__"> +<tt class="descname">__len__</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.simple.SimpleBuffer.__len__" title="Permalink to this definition">¶</a></dt> +<dd><p><cite>len(self) -> self.qsize()</cite></p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.simple.SimpleBuffer.qsize"> +<tt class="descname">qsize</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.simple.SimpleBuffer.qsize" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> +<dl class="method"> +<dt id="kombu.simple.SimpleBuffer.close"> +<tt class="descname">close</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.simple.SimpleBuffer.close" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +</div> </div> @@ -109,12 +259,21 @@ <div class="sphinxsidebarwrapper"><p class="logo"><a href="../index.html"> <img class="logo" width="128" height="128" src="http://cloud.github.com/downloads/ask/kombu/kombusmall.jpg" alt="Logo"/> </a></p> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">kombu.simple</a><ul> +<li><a class="reference internal" href="#persistent">Persistent</a></li> +<li><a class="reference internal" href="#buffer">Buffer</a></li> +</ul> +</li> +</ul> + <h4>Previous topic</h4> <p class="topless"><a href="kombu.connection.html" - title="previous chapter">Broker Connections - kombu.connection</a></p> + title="previous chapter">kombu.connection</a></p> <h4>Next topic</h4> <p class="topless"><a href="kombu.messaging.html" - title="next chapter">Messaging - kombu.messaging</a></p> + title="next chapter">kombu.messaging</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../sources/reference/kombu.simple.txt" @@ -147,18 +306,18 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.messaging.html" title="Messaging - kombu.messaging" + <a href="kombu.messaging.html" title="kombu.messaging" >next</a> |</li> <li class="right" > - <a href="kombu.connection.html" title="Broker Connections - kombu.connection" + <a href="kombu.connection.html" title="kombu.connection" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.transport.base.html b/reference/kombu.transport.base.html index 3f5a5440..9ea20e45 100644 --- a/reference/kombu.transport.base.html +++ b/reference/kombu.transport.base.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Base Transport Interface - kombu.transport.base — Kombu v0.9.0 documentation</title> + <title>kombu.transport.base — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,10 +21,10 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> - <link rel="next" title="Virtual Transport Interface - kombu.transport.virtual" href="kombu.transport.virtual.html" /> - <link rel="prev" title="In-memory Transport - kombu.transport.memory" href="kombu.transport.memory.html" /> + <link rel="next" title="kombu.transport.virtual" href="kombu.transport.virtual.html" /> + <link rel="prev" title="kombu.transport.memory" href="kombu.transport.memory.html" /> </head> <body> <div class="related"> @@ -37,12 +37,12 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.transport.virtual.html" title="Virtual Transport Interface - kombu.transport.virtual" + <a href="kombu.transport.virtual.html" title="kombu.transport.virtual" accesskey="N">next</a> |</li> <li class="right" > - <a href="kombu.transport.memory.html" title="In-memory Transport - kombu.transport.memory" + <a href="kombu.transport.memory.html" title="kombu.transport.memory" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -52,22 +52,98 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="base-transport-interface-kombu-transport-base"> -<h1>Base Transport Interface - kombu.transport.base<a class="headerlink" href="#base-transport-interface-kombu-transport-base" title="Permalink to this headline">¶</a></h1> -<span class="target" id="module-kombu.transport.base"></span><p>Transport base classes.</p> + <span class="target" id="module-kombu.transport.base"></span><div class="section" id="kombu-transport-base"> +<h1>kombu.transport.base<a class="headerlink" href="#kombu-transport-base" title="Permalink to this headline">¶</a></h1> +<p>Base transport interface.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3"> +<li>2009 - 2010 by Ask Solem.</li> +</ol> +</td> +</tr> +<tr class="field"><th class="field-name">license:</th><td class="field-body"><p class="first last">BSD, see LICENSE for more details.</p> +</td> +</tr> +</tbody> +</table> +<div class="contents local topic" id="contents"> +<ul class="simple"> +<li><a class="reference internal" href="#message" id="id1">Message</a></li> +<li><a class="reference internal" href="#transport" id="id2">Transport</a></li> +</ul> +</div> +<div class="section" id="message"> +<h2><a class="toc-backref" href="#id1">Message</a><a class="headerlink" href="#message" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="kombu.transport.base.Message"> <em class="property">class </em><tt class="descclassname">kombu.transport.base.</tt><tt class="descname">Message</tt><big>(</big><em>channel</em>, <em>body=None</em>, <em>delivery_tag=None</em>, <em>content_type=None</em>, <em>content_encoding=None</em>, <em>delivery_info={}</em>, <em>properties=None</em>, <em>headers=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.base.Message" title="Permalink to this definition">¶</a></dt> <dd><p>Base class for received messages.</p> -<dl class="exception"> -<dt id="kombu.transport.base.Message.MessageStateError"> -<em class="property">exception </em><tt class="descname">MessageStateError</tt><a class="headerlink" href="#kombu.transport.base.Message.MessageStateError" title="Permalink to this definition">¶</a></dt> -<dd><p>The message has already been acknowledged.</p> +<dl class="attribute"> +<dt id="kombu.transport.base.Message.payload"> +<tt class="descname">payload</tt><a class="headerlink" href="#kombu.transport.base.Message.payload" title="Permalink to this definition">¶</a></dt> +<dd><p>The decoded message body.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.transport.base.Message.channel"> +<tt class="descname">channel</tt><a class="headerlink" href="#kombu.transport.base.Message.channel" title="Permalink to this definition">¶</a></dt> +<dd><p>The channel the message was received on.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.transport.base.Message.delivery_tag"> +<tt class="descname">delivery_tag</tt><a class="headerlink" href="#kombu.transport.base.Message.delivery_tag" title="Permalink to this definition">¶</a></dt> +<dd><p>Delivery tag used to identify the message in this channel.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.transport.base.Message.content_type"> +<tt class="descname">content_type</tt><a class="headerlink" href="#kombu.transport.base.Message.content_type" title="Permalink to this definition">¶</a></dt> +<dd><p>Content type used to identify the type of content.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.transport.base.Message.content_encoding"> +<tt class="descname">content_encoding</tt><a class="headerlink" href="#kombu.transport.base.Message.content_encoding" title="Permalink to this definition">¶</a></dt> +<dd><p>Content encoding used to identify the text encoding of the body.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.transport.base.Message.delivery_info"> +<tt class="descname">delivery_info</tt><a class="headerlink" href="#kombu.transport.base.Message.delivery_info" title="Permalink to this definition">¶</a></dt> +<dd><p>Additional delivery information.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.transport.base.Message.headers"> +<tt class="descname">headers</tt><a class="headerlink" href="#kombu.transport.base.Message.headers" title="Permalink to this definition">¶</a></dt> +<dd><p>Message headers</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.transport.base.Message.properties"> +<tt class="descname">properties</tt><a class="headerlink" href="#kombu.transport.base.Message.properties" title="Permalink to this definition">¶</a></dt> +<dd><p>Application properties</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.transport.base.Message.body"> +<tt class="descname">body</tt><a class="headerlink" href="#kombu.transport.base.Message.body" title="Permalink to this definition">¶</a></dt> +<dd><p>Raw message body (may be serialized), see <a class="reference internal" href="#kombu.transport.base.Message.payload" title="kombu.transport.base.Message.payload"><tt class="xref py py-attr docutils literal"><span class="pre">payload</span></tt></a> instead.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.transport.base.Message.acknowledged"> +<tt class="descname">acknowledged</tt><a class="headerlink" href="#kombu.transport.base.Message.acknowledged" title="Permalink to this definition">¶</a></dt> +<dd><p>Set to true if the message has been acknowledged.</p> </dd></dl> <dl class="method"> <dt id="kombu.transport.base.Message.ack"> -<tt class="descclassname">Message.</tt><tt class="descname">ack</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.base.Message.ack" title="Permalink to this definition">¶</a></dt> +<tt class="descname">ack</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.base.Message.ack" title="Permalink to this definition">¶</a></dt> <dd><p>Acknowledge this message as being processed., This will remove the message from the queue.</p> <table class="docutils field-list" frame="void" rules="none"> @@ -82,27 +158,9 @@ acknowledged/requeued/rejected.</td> </table> </dd></dl> -<dl class="attribute"> -<dt id="kombu.transport.base.Message.acknowledged"> -<tt class="descclassname">Message.</tt><tt class="descname">acknowledged</tt><a class="headerlink" href="#kombu.transport.base.Message.acknowledged" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -<dl class="method"> -<dt id="kombu.transport.base.Message.decode"> -<tt class="descclassname">Message.</tt><tt class="descname">decode</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.base.Message.decode" title="Permalink to this definition">¶</a></dt> -<dd><p>Deserialize the message body, returning the original -python structure sent by the publisher.</p> -</dd></dl> - -<dl class="attribute"> -<dt id="kombu.transport.base.Message.payload"> -<tt class="descclassname">Message.</tt><tt class="descname">payload</tt><a class="headerlink" href="#kombu.transport.base.Message.payload" title="Permalink to this definition">¶</a></dt> -<dd><p>The decoded message.</p> -</dd></dl> - <dl class="method"> <dt id="kombu.transport.base.Message.reject"> -<tt class="descclassname">Message.</tt><tt class="descname">reject</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.base.Message.reject" title="Permalink to this definition">¶</a></dt> +<tt class="descname">reject</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.base.Message.reject" title="Permalink to this definition">¶</a></dt> <dd><p>Reject this message.</p> <p>The message will be discarded by the server.</p> <table class="docutils field-list" frame="void" rules="none"> @@ -119,7 +177,7 @@ acknowledged/requeued/rejected.</td> <dl class="method"> <dt id="kombu.transport.base.Message.requeue"> -<tt class="descclassname">Message.</tt><tt class="descname">requeue</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.base.Message.requeue" title="Permalink to this definition">¶</a></dt> +<tt class="descname">requeue</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.base.Message.requeue" title="Permalink to this definition">¶</a></dt> <dd><p>Reject this message and put it back on the queue.</p> <p>You must not use this method as a means of selecting messages to process.</p> @@ -135,12 +193,51 @@ acknowledged/requeued/rejected.</td> </table> </dd></dl> +<dl class="method"> +<dt id="kombu.transport.base.Message.decode"> +<tt class="descname">decode</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.base.Message.decode" title="Permalink to this definition">¶</a></dt> +<dd><p>Deserialize the message body, returning the original +python structure sent by the publisher.</p> +</dd></dl> + </dd></dl> +</div> +<div class="section" id="transport"> +<h2><a class="toc-backref" href="#id2">Transport</a><a class="headerlink" href="#transport" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="kombu.transport.base.Transport"> <em class="property">class </em><tt class="descclassname">kombu.transport.base.</tt><tt class="descname">Transport</tt><big>(</big><em>client</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.base.Transport" title="Permalink to this definition">¶</a></dt> <dd><p>Base class for transports.</p> +<dl class="attribute"> +<dt id="kombu.transport.base.Transport.client"> +<tt class="descname">client</tt><a class="headerlink" href="#kombu.transport.base.Transport.client" title="Permalink to this definition">¶</a></dt> +<dd><p>The <a class="reference internal" href="kombu.connection.html#kombu.connection.BrokerConnection" title="kombu.connection.BrokerConnection"><tt class="xref py py-class docutils literal"><span class="pre">BrokerConnection</span></tt></a> owning this instance.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.transport.base.Transport.default_port"> +<tt class="descname">default_port</tt><a class="headerlink" href="#kombu.transport.base.Transport.default_port" title="Permalink to this definition">¶</a></dt> +<dd><p>Default port used when no port has been specified.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.transport.base.Transport.connection_errors"> +<tt class="descname">connection_errors</tt><a class="headerlink" href="#kombu.transport.base.Transport.connection_errors" title="Permalink to this definition">¶</a></dt> +<dd><p>Tuple of errors that can happen due to connection failure.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.transport.base.Transport.channel_errors"> +<tt class="descname">channel_errors</tt><a class="headerlink" href="#kombu.transport.base.Transport.channel_errors" title="Permalink to this definition">¶</a></dt> +<dd><p>Tuple of errors that can happen due to channel/method failure.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.transport.base.Transport.establish_connection"> +<tt class="descname">establish_connection</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.base.Transport.establish_connection" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + <dl class="method"> <dt id="kombu.transport.base.Transport.close_connection"> <tt class="descname">close_connection</tt><big>(</big><em>connection</em><big>)</big><a class="headerlink" href="#kombu.transport.base.Transport.close_connection" title="Permalink to this definition">¶</a></dt> @@ -152,18 +249,19 @@ acknowledged/requeued/rejected.</td> <dd></dd></dl> <dl class="method"> -<dt id="kombu.transport.base.Transport.drain_events"> -<tt class="descname">drain_events</tt><big>(</big><em>connection</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.base.Transport.drain_events" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.transport.base.Transport.close_channel"> +<tt class="descname">close_channel</tt><big>(</big><em>connection</em><big>)</big><a class="headerlink" href="#kombu.transport.base.Transport.close_channel" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="method"> -<dt id="kombu.transport.base.Transport.establish_connection"> -<tt class="descname">establish_connection</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.base.Transport.establish_connection" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.transport.base.Transport.drain_events"> +<tt class="descname">drain_events</tt><big>(</big><em>connection</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.base.Transport.drain_events" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </dd></dl> </div> +</div> </div> @@ -173,12 +271,21 @@ acknowledged/requeued/rejected.</td> <div class="sphinxsidebarwrapper"><p class="logo"><a href="../index.html"> <img class="logo" width="128" height="128" src="http://cloud.github.com/downloads/ask/kombu/kombusmall.jpg" alt="Logo"/> </a></p> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">kombu.transport.base</a><ul> +<li><a class="reference internal" href="#message">Message</a></li> +<li><a class="reference internal" href="#transport">Transport</a></li> +</ul> +</li> +</ul> + <h4>Previous topic</h4> <p class="topless"><a href="kombu.transport.memory.html" - title="previous chapter">In-memory Transport - kombu.transport.memory</a></p> + title="previous chapter">kombu.transport.memory</a></p> <h4>Next topic</h4> <p class="topless"><a href="kombu.transport.virtual.html" - title="next chapter">Virtual Transport Interface - kombu.transport.virtual</a></p> + title="next chapter">kombu.transport.virtual</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../sources/reference/kombu.transport.base.txt" @@ -211,18 +318,18 @@ acknowledged/requeued/rejected.</td> <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.transport.virtual.html" title="Virtual Transport Interface - kombu.transport.virtual" + <a href="kombu.transport.virtual.html" title="kombu.transport.virtual" >next</a> |</li> <li class="right" > - <a href="kombu.transport.memory.html" title="In-memory Transport - kombu.transport.memory" + <a href="kombu.transport.memory.html" title="kombu.transport.memory" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.transport.html b/reference/kombu.transport.html index c3cbf1a0..511ff041 100644 --- a/reference/kombu.transport.html +++ b/reference/kombu.transport.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Transports - kombu.transport — Kombu v0.9.0 documentation</title> + <title><no title> — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,10 +21,10 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> - <link rel="next" title="pika Transport - kombu.transport.pypika" href="kombu.transport.pypika.html" /> - <link rel="prev" title="Exceptions - kombu.exceptions" href="kombu.exceptions.html" /> + <link rel="next" title="kombu.transport.pypika" href="kombu.transport.pypika.html" /> + <link rel="prev" title="kombu.exceptions" href="kombu.exceptions.html" /> </head> <body> <div class="related"> @@ -37,12 +37,12 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.transport.pypika.html" title="pika Transport - kombu.transport.pypika" + <a href="kombu.transport.pypika.html" title="kombu.transport.pypika" accesskey="N">next</a> |</li> <li class="right" > - <a href="kombu.exceptions.html" title="Exceptions - kombu.exceptions" + <a href="kombu.exceptions.html" title="kombu.exceptions" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -52,27 +52,7 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="transports-kombu-transport"> -<h1>Transports - kombu.transport<a class="headerlink" href="#transports-kombu-transport" title="Permalink to this headline">¶</a></h1> -<span class="target" id="module-kombu.transport"></span><dl class="function"> -<dt id="kombu.transport.get_transport_cls"> -<tt class="descclassname">kombu.transport.</tt><tt class="descname">get_transport_cls</tt><big>(</big><em>transport=None</em><big>)</big><a class="headerlink" href="#kombu.transport.get_transport_cls" title="Permalink to this definition">¶</a></dt> -<dd><p>Get transport class by name.</p> -<p>The transport string is the full path to a transport class, e.g.:</p> -<div class="highlight-python"><div class="highlight"><pre><span class="s">"kombu.transport.pyamqplib.Transport"</span> -</pre></div> -</div> -<p>If the name does not include “<tt class="docutils literal"><span class="pre">.</span></tt>” (is not fully qualified), -the alias table will be consulted.</p> -</dd></dl> - -<dl class="function"> -<dt id="kombu.transport.resolve_transport"> -<tt class="descclassname">kombu.transport.</tt><tt class="descname">resolve_transport</tt><big>(</big><em>transport=None</em><big>)</big><a class="headerlink" href="#kombu.transport.resolve_transport" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -</div> - + </div> </div> @@ -83,10 +63,10 @@ the alias table will be consulted.</p> </a></p> <h4>Previous topic</h4> <p class="topless"><a href="kombu.exceptions.html" - title="previous chapter">Exceptions - kombu.exceptions</a></p> + title="previous chapter">kombu.exceptions</a></p> <h4>Next topic</h4> <p class="topless"><a href="kombu.transport.pypika.html" - title="next chapter">pika Transport - kombu.transport.pypika</a></p> + title="next chapter">kombu.transport.pypika</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../sources/reference/kombu.transport.txt" @@ -119,18 +99,18 @@ the alias table will be consulted.</p> <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.transport.pypika.html" title="pika Transport - kombu.transport.pypika" + <a href="kombu.transport.pypika.html" title="kombu.transport.pypika" >next</a> |</li> <li class="right" > - <a href="kombu.exceptions.html" title="Exceptions - kombu.exceptions" + <a href="kombu.exceptions.html" title="kombu.exceptions" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.transport.memory.html b/reference/kombu.transport.memory.html index f77bb8bc..a6759fe3 100644 --- a/reference/kombu.transport.memory.html +++ b/reference/kombu.transport.memory.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>In-memory Transport - kombu.transport.memory — Kombu v0.9.0 documentation</title> + <title>kombu.transport.memory — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,10 +21,10 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> - <link rel="next" title="Base Transport Interface - kombu.transport.base" href="kombu.transport.base.html" /> - <link rel="prev" title="Redis Transport - kombu.transport.pyredis" href="kombu.transport.pyredis.html" /> + <link rel="next" title="kombu.transport.base" href="kombu.transport.base.html" /> + <link rel="prev" title="kombu.transport.pyredis" href="kombu.transport.pyredis.html" /> </head> <body> <div class="related"> @@ -37,12 +37,12 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.transport.base.html" title="Base Transport Interface - kombu.transport.base" + <a href="kombu.transport.base.html" title="kombu.transport.base" accesskey="N">next</a> |</li> <li class="right" > - <a href="kombu.transport.pyredis.html" title="Redis Transport - kombu.transport.pyredis" + <a href="kombu.transport.pyredis.html" title="kombu.transport.pyredis" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -52,13 +52,31 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="in-memory-transport-kombu-transport-memory"> -<h1>In-memory Transport - kombu.transport.memory<a class="headerlink" href="#in-memory-transport-kombu-transport-memory" title="Permalink to this headline">¶</a></h1> -<span class="target" id="module-kombu.transport.memory"></span><dl class="class"> -<dt id="kombu.transport.memory.Channel"> -<em class="property">class </em><tt class="descclassname">kombu.transport.memory.</tt><tt class="descname">Channel</tt><big>(</big><em>connection</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.memory.Channel" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - + <span class="target" id="module-kombu.transport.memory"></span><div class="section" id="kombu-transport-memory"> +<h1>kombu.transport.memory<a class="headerlink" href="#kombu-transport-memory" title="Permalink to this headline">¶</a></h1> +<p>In-memory transport.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3"> +<li>2009 - 2010 by Ask Solem.</li> +</ol> +</td> +</tr> +<tr class="field"><th class="field-name">license:</th><td class="field-body"><p class="first last">BSD, see LICENSE for more details.</p> +</td> +</tr> +</tbody> +</table> +<div class="contents local topic" id="contents"> +<ul class="simple"> +<li><a class="reference internal" href="#transport" id="id1">Transport</a></li> +<li><a class="reference internal" href="#channel" id="id2">Channel</a></li> +</ul> +</div> +<div class="section" id="transport"> +<h2><a class="toc-backref" href="#id1">Transport</a><a class="headerlink" href="#transport" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="kombu.transport.memory.Transport"> <em class="property">class </em><tt class="descclassname">kombu.transport.memory.</tt><tt class="descname">Transport</tt><big>(</big><em>client</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.memory.Transport" title="Permalink to this definition">¶</a></dt> @@ -67,9 +85,24 @@ <em class="property">class </em><tt class="descname">Channel</tt><big>(</big><em>connection</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.memory.Transport.Channel" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> +<dl class="attribute"> +<dt id="kombu.transport.memory.Transport.state"> +<tt class="descclassname">Transport.</tt><tt class="descname">state</tt><a class="headerlink" href="#kombu.transport.memory.Transport.state" title="Permalink to this definition">¶</a></dt> +<dd><p>memory backend state is global.</p> +</dd></dl> + </dd></dl> </div> +<div class="section" id="channel"> +<h2><a class="toc-backref" href="#id2">Channel</a><a class="headerlink" href="#channel" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="kombu.transport.memory.Channel"> +<em class="property">class </em><tt class="descclassname">kombu.transport.memory.</tt><tt class="descname">Channel</tt><big>(</big><em>connection</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.memory.Channel" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</div> +</div> </div> @@ -79,12 +112,21 @@ <div class="sphinxsidebarwrapper"><p class="logo"><a href="../index.html"> <img class="logo" width="128" height="128" src="http://cloud.github.com/downloads/ask/kombu/kombusmall.jpg" alt="Logo"/> </a></p> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">kombu.transport.memory</a><ul> +<li><a class="reference internal" href="#transport">Transport</a></li> +<li><a class="reference internal" href="#channel">Channel</a></li> +</ul> +</li> +</ul> + <h4>Previous topic</h4> <p class="topless"><a href="kombu.transport.pyredis.html" - title="previous chapter">Redis Transport - kombu.transport.pyredis</a></p> + title="previous chapter">kombu.transport.pyredis</a></p> <h4>Next topic</h4> <p class="topless"><a href="kombu.transport.base.html" - title="next chapter">Base Transport Interface - kombu.transport.base</a></p> + title="next chapter">kombu.transport.base</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../sources/reference/kombu.transport.memory.txt" @@ -117,18 +159,18 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.transport.base.html" title="Base Transport Interface - kombu.transport.base" + <a href="kombu.transport.base.html" title="kombu.transport.base" >next</a> |</li> <li class="right" > - <a href="kombu.transport.pyredis.html" title="Redis Transport - kombu.transport.pyredis" + <a href="kombu.transport.pyredis.html" title="kombu.transport.pyredis" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.transport.pyamqplib.html b/reference/kombu.transport.pyamqplib.html index 103ba767..18d52e11 100644 --- a/reference/kombu.transport.pyamqplib.html +++ b/reference/kombu.transport.pyamqplib.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>amqplib Transport - kombu.transport.pyamqplib — Kombu v0.9.0 documentation</title> + <title>kombu.transport.pyamqplib — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,10 +21,10 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> - <link rel="next" title="Redis Transport - kombu.transport.pyredis" href="kombu.transport.pyredis.html" /> - <link rel="prev" title="pika Transport - kombu.transport.pypika" href="kombu.transport.pypika.html" /> + <link rel="next" title="kombu.transport.pyredis" href="kombu.transport.pyredis.html" /> + <link rel="prev" title="kombu.transport.pypika" href="kombu.transport.pypika.html" /> </head> <body> <div class="related"> @@ -37,12 +37,12 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.transport.pyredis.html" title="Redis Transport - kombu.transport.pyredis" + <a href="kombu.transport.pyredis.html" title="kombu.transport.pyredis" accesskey="N">next</a> |</li> <li class="right" > - <a href="kombu.transport.pypika.html" title="pika Transport - kombu.transport.pypika" + <a href="kombu.transport.pypika.html" title="kombu.transport.pypika" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -52,9 +52,152 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="amqplib-transport-kombu-transport-pyamqplib"> -<h1>amqplib Transport - kombu.transport.pyamqplib<a class="headerlink" href="#amqplib-transport-kombu-transport-pyamqplib" title="Permalink to this headline">¶</a></h1> -<span class="target" id="module-kombu.transport.pyamqplib"></span><dl class="class"> + <span class="target" id="module-kombu.transport.pyamqplib"></span><div class="section" id="kombu-transport-pyamqplib"> +<h1>kombu.transport.pyamqplib<a class="headerlink" href="#kombu-transport-pyamqplib" title="Permalink to this headline">¶</a></h1> +<p>amqplib transport.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3"> +<li>2009 - 2010 by Ask Solem.</li> +</ol> +</td> +</tr> +<tr class="field"><th class="field-name">license:</th><td class="field-body"><p class="first last">BSD, see LICENSE for more details.</p> +</td> +</tr> +</tbody> +</table> +<div class="contents local topic" id="contents"> +<ul class="simple"> +<li><a class="reference internal" href="#transport" id="id1">Transport</a></li> +<li><a class="reference internal" href="#connection" id="id2">Connection</a></li> +<li><a class="reference internal" href="#channel" id="id3">Channel</a></li> +<li><a class="reference internal" href="#message" id="id4">Message</a></li> +</ul> +</div> +<div class="section" id="transport"> +<h2><a class="toc-backref" href="#id1">Transport</a><a class="headerlink" href="#transport" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="kombu.transport.pyamqplib.Transport"> +<em class="property">class </em><tt class="descclassname">kombu.transport.pyamqplib.</tt><tt class="descname">Transport</tt><big>(</big><em>client</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Transport" title="Permalink to this definition">¶</a></dt> +<dd><dl class="method"> +<dt id="kombu.transport.pyamqplib.Transport.close_connection"> +<tt class="descname">close_connection</tt><big>(</big><em>connection</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Transport.close_connection" title="Permalink to this definition">¶</a></dt> +<dd><p>Close the AMQP broker connection.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.transport.pyamqplib.Transport.create_channel"> +<tt class="descname">create_channel</tt><big>(</big><em>connection</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Transport.create_channel" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="kombu.transport.pyamqplib.Transport.drain_events"> +<tt class="descname">drain_events</tt><big>(</big><em>connection</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Transport.drain_events" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="kombu.transport.pyamqplib.Transport.establish_connection"> +<tt class="descname">establish_connection</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Transport.establish_connection" title="Permalink to this definition">¶</a></dt> +<dd><p>Establish connection to the AMQP broker.</p> +</dd></dl> + +</dd></dl> + +</div> +<div class="section" id="connection"> +<h2><a class="toc-backref" href="#id2">Connection</a><a class="headerlink" href="#connection" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="kombu.transport.pyamqplib.Connection"> +<em class="property">class </em><tt class="descclassname">kombu.transport.pyamqplib.</tt><tt class="descname">Connection</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Connection" title="Permalink to this definition">¶</a></dt> +<dd><dl class="method"> +<dt id="kombu.transport.pyamqplib.Connection.channel"> +<tt class="descname">channel</tt><big>(</big><em>channel_id=None</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Connection.channel" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="kombu.transport.pyamqplib.Connection.close"> +<tt class="descname">close</tt><big>(</big><em>reply_code=0</em>, <em>reply_text=''</em>, <em>method_sig=(0</em>, <em>0)</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Connection.close" title="Permalink to this definition">¶</a></dt> +<dd><p>request a connection close</p> +<p>This method indicates that the sender wants to close the +connection. This may be due to internal conditions (e.g. a +forced shut-down) or due to an error handling a specific +method, i.e. an exception. When a close is due to an +exception, the sender provides the class and method id of the +method which caused the exception.</p> +<p>RULE:</p> +<blockquote> +After sending this method any received method except the +Close-OK method MUST be discarded.</blockquote> +<p>RULE:</p> +<blockquote> +The peer sending this method MAY use a counter or timeout +to detect failure of the other peer to respond correctly +with the Close-OK method.</blockquote> +<p>RULE:</p> +<blockquote> +When a server receives the Close method from a client it +MUST delete all server-side resources associated with the +client’s context. A client CANNOT reconnect to a context +after sending or receiving a Close method.</blockquote> +<dl class="docutils"> +<dt>PARAMETERS:</dt> +<dd><p class="first">reply_code: short</p> +<blockquote> +The reply code. The AMQ reply codes are defined in AMQ +RFC 011.</blockquote> +<p>reply_text: shortstr</p> +<blockquote> +The localised reply text. This text can be logged as an +aid to resolving issues.</blockquote> +<p>class_id: short</p> +<blockquote> +<p>failing method class</p> +<p>When the close is provoked by a method exception, this +is the class of the method.</p> +</blockquote> +<p>method_id: short</p> +<blockquote class="last"> +<p>failing method ID</p> +<p>When the close is provoked by a method exception, this +is the ID of the method.</p> +</blockquote> +</dd> +</dl> +</dd></dl> + +<dl class="method"> +<dt id="kombu.transport.pyamqplib.Connection.drain_events"> +<tt class="descname">drain_events</tt><big>(</big><em>allowed_methods=None</em>, <em>timeout=None</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Connection.drain_events" title="Permalink to this definition">¶</a></dt> +<dd><p>Wait for an event on any channel.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.transport.pyamqplib.Connection.read_timeout"> +<tt class="descname">read_timeout</tt><big>(</big><em>timeout=None</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Connection.read_timeout" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="kombu.transport.pyamqplib.Connection.wait"> +<tt class="descname">wait</tt><big>(</big><em>allowed_methods=None</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Connection.wait" title="Permalink to this definition">¶</a></dt> +<dd><p>Wait for a method that matches our allowed_methods parameter (the +default value of None means match any method), and dispatch to it.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.transport.pyamqplib.Connection.wait_multi"> +<tt class="descname">wait_multi</tt><big>(</big><em>channels</em>, <em>allowed_methods=None</em>, <em>timeout=None</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Connection.wait_multi" title="Permalink to this definition">¶</a></dt> +<dd><p>Wait for an event on a channel.</p> +</dd></dl> + +</dd></dl> + +</div> +<div class="section" id="channel"> +<h2><a class="toc-backref" href="#id3">Channel</a><a class="headerlink" href="#channel" title="Permalink to this headline">¶</a></h2> +<dl class="class"> <dt id="kombu.transport.pyamqplib.Channel"> <em class="property">class </em><tt class="descclassname">kombu.transport.pyamqplib.</tt><tt class="descname">Channel</tt><big>(</big><em>connection</em>, <em>channel_id=None</em>, <em>auto_decode=True</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Channel" title="Permalink to this definition">¶</a></dt> <dd><dl class="class"> @@ -95,33 +238,9 @@ </dd></dl> -<dl class="class"> -<dt id="kombu.transport.pyamqplib.Connection"> -<em class="property">class </em><tt class="descclassname">kombu.transport.pyamqplib.</tt><tt class="descname">Connection</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Connection" title="Permalink to this definition">¶</a></dt> -<dd><dl class="method"> -<dt id="kombu.transport.pyamqplib.Connection.channel"> -<tt class="descname">channel</tt><big>(</big><em>channel_id=None</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Connection.channel" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -<dl class="method"> -<dt id="kombu.transport.pyamqplib.Connection.drain_events"> -<tt class="descname">drain_events</tt><big>(</big><em>allowed_methods=None</em>, <em>timeout=None</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Connection.drain_events" title="Permalink to this definition">¶</a></dt> -<dd><p>Wait for an event on any channel.</p> -</dd></dl> - -<dl class="method"> -<dt id="kombu.transport.pyamqplib.Connection.read_timeout"> -<tt class="descname">read_timeout</tt><big>(</big><em>timeout=None</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Connection.read_timeout" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -<dl class="method"> -<dt id="kombu.transport.pyamqplib.Connection.wait_multi"> -<tt class="descname">wait_multi</tt><big>(</big><em>channels</em>, <em>allowed_methods=None</em>, <em>timeout=None</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Connection.wait_multi" title="Permalink to this definition">¶</a></dt> -<dd><p>Wait for an event on a channel.</p> -</dd></dl> - -</dd></dl> - +</div> +<div class="section" id="message"> +<h2><a class="toc-backref" href="#id4">Message</a><a class="headerlink" href="#message" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="kombu.transport.pyamqplib.Message"> <em class="property">class </em><tt class="descclassname">kombu.transport.pyamqplib.</tt><tt class="descname">Message</tt><big>(</big><em>channel</em>, <em>msg</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Message" title="Permalink to this definition">¶</a></dt> @@ -146,33 +265,7 @@ </dd></dl> -<dl class="class"> -<dt id="kombu.transport.pyamqplib.Transport"> -<em class="property">class </em><tt class="descclassname">kombu.transport.pyamqplib.</tt><tt class="descname">Transport</tt><big>(</big><em>client</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Transport" title="Permalink to this definition">¶</a></dt> -<dd><dl class="method"> -<dt id="kombu.transport.pyamqplib.Transport.close_connection"> -<tt class="descname">close_connection</tt><big>(</big><em>connection</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Transport.close_connection" title="Permalink to this definition">¶</a></dt> -<dd><p>Close the AMQP broker connection.</p> -</dd></dl> - -<dl class="method"> -<dt id="kombu.transport.pyamqplib.Transport.create_channel"> -<tt class="descname">create_channel</tt><big>(</big><em>connection</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Transport.create_channel" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -<dl class="method"> -<dt id="kombu.transport.pyamqplib.Transport.drain_events"> -<tt class="descname">drain_events</tt><big>(</big><em>connection</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Transport.drain_events" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -<dl class="method"> -<dt id="kombu.transport.pyamqplib.Transport.establish_connection"> -<tt class="descname">establish_connection</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.pyamqplib.Transport.establish_connection" title="Permalink to this definition">¶</a></dt> -<dd><p>Establish connection to the AMQP broker.</p> -</dd></dl> - -</dd></dl> - +</div> </div> @@ -183,12 +276,23 @@ <div class="sphinxsidebarwrapper"><p class="logo"><a href="../index.html"> <img class="logo" width="128" height="128" src="http://cloud.github.com/downloads/ask/kombu/kombusmall.jpg" alt="Logo"/> </a></p> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">kombu.transport.pyamqplib</a><ul> +<li><a class="reference internal" href="#transport">Transport</a></li> +<li><a class="reference internal" href="#connection">Connection</a></li> +<li><a class="reference internal" href="#channel">Channel</a></li> +<li><a class="reference internal" href="#message">Message</a></li> +</ul> +</li> +</ul> + <h4>Previous topic</h4> <p class="topless"><a href="kombu.transport.pypika.html" - title="previous chapter">pika Transport - kombu.transport.pypika</a></p> + title="previous chapter">kombu.transport.pypika</a></p> <h4>Next topic</h4> <p class="topless"><a href="kombu.transport.pyredis.html" - title="next chapter">Redis Transport - kombu.transport.pyredis</a></p> + title="next chapter">kombu.transport.pyredis</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../sources/reference/kombu.transport.pyamqplib.txt" @@ -221,18 +325,18 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.transport.pyredis.html" title="Redis Transport - kombu.transport.pyredis" + <a href="kombu.transport.pyredis.html" title="kombu.transport.pyredis" >next</a> |</li> <li class="right" > - <a href="kombu.transport.pypika.html" title="pika Transport - kombu.transport.pypika" + <a href="kombu.transport.pypika.html" title="kombu.transport.pypika" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.transport.pypika.html b/reference/kombu.transport.pypika.html index 767bd25d..34032dba 100644 --- a/reference/kombu.transport.pypika.html +++ b/reference/kombu.transport.pypika.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>pika Transport - kombu.transport.pypika — Kombu v0.9.0 documentation</title> + <title>kombu.transport.pypika — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,10 +21,10 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> - <link rel="next" title="amqplib Transport - kombu.transport.pyamqplib" href="kombu.transport.pyamqplib.html" /> - <link rel="prev" title="Transports - kombu.transport" href="kombu.transport.html" /> + <link rel="next" title="kombu.transport.pyamqplib" href="kombu.transport.pyamqplib.html" /> + <link rel="prev" title="<no title>" href="kombu.transport.html" /> </head> <body> <div class="related"> @@ -37,12 +37,12 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.transport.pyamqplib.html" title="amqplib Transport - kombu.transport.pyamqplib" + <a href="kombu.transport.pyamqplib.html" title="kombu.transport.pyamqplib" accesskey="N">next</a> |</li> <li class="right" > - <a href="kombu.transport.html" title="Transports - kombu.transport" + <a href="kombu.transport.html" title="<no title>" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -52,18 +52,33 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="pika-transport-kombu-transport-pypika"> -<h1>pika Transport - kombu.transport.pypika<a class="headerlink" href="#pika-transport-kombu-transport-pypika" title="Permalink to this headline">¶</a></h1> -<span class="target" id="module-kombu.transport.pypika"></span><dl class="class"> -<dt id="kombu.transport.pypika.AsyncoreConnection"> -<em class="property">class </em><tt class="descclassname">kombu.transport.pypika.</tt><tt class="descname">AsyncoreConnection</tt><big>(</big><em>parameters</em>, <em>wait_for_open=True</em>, <em>reconnection_strategy=None</em><big>)</big><a class="headerlink" href="#kombu.transport.pypika.AsyncoreConnection" title="Permalink to this definition">¶</a></dt> -<dd><dl class="method"> -<dt id="kombu.transport.pypika.AsyncoreConnection.channel"> -<tt class="descname">channel</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.pypika.AsyncoreConnection.channel" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -</dd></dl> - + <span class="target" id="module-kombu.transport.pypika"></span><div class="section" id="kombu-transport-pypika"> +<h1>kombu.transport.pypika<a class="headerlink" href="#kombu-transport-pypika" title="Permalink to this headline">¶</a></h1> +<p>Pika transport.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3"> +<li>2009 - 2010 by Ask Solem.</li> +</ol> +</td> +</tr> +<tr class="field"><th class="field-name">license:</th><td class="field-body"><p class="first last">BSD, see LICENSE for more details.</p> +</td> +</tr> +</tbody> +</table> +<div class="contents local topic" id="contents"> +<ul class="simple"> +<li><a class="reference internal" href="#transports" id="id1">Transports</a></li> +<li><a class="reference internal" href="#connections" id="id2">Connections</a></li> +<li><a class="reference internal" href="#channel" id="id3">Channel</a></li> +<li><a class="reference internal" href="#message" id="id4">Message</a></li> +</ul> +</div> +<div class="section" id="transports"> +<h2><a class="toc-backref" href="#id1">Transports</a><a class="headerlink" href="#transports" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="kombu.transport.pypika.AsyncoreTransport"> <em class="property">class </em><tt class="descclassname">kombu.transport.pypika.</tt><tt class="descname">AsyncoreTransport</tt><big>(</big><em>client</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.pypika.AsyncoreTransport" title="Permalink to this definition">¶</a></dt> @@ -76,6 +91,57 @@ </dd></dl> <dl class="class"> +<dt id="kombu.transport.pypika.SyncTransport"> +<em class="property">class </em><tt class="descclassname">kombu.transport.pypika.</tt><tt class="descname">SyncTransport</tt><big>(</big><em>client</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.pypika.SyncTransport" title="Permalink to this definition">¶</a></dt> +<dd><dl class="attribute"> +<dt id="kombu.transport.pypika.SyncTransport.Connection"> +<tt class="descname">Connection</tt><a class="headerlink" href="#kombu.transport.pypika.SyncTransport.Connection" title="Permalink to this definition">¶</a></dt> +<dd><p>alias of <a class="reference internal" href="#kombu.transport.pypika.BlockingConnection" title="kombu.transport.pypika.BlockingConnection"><tt class="xref py py-class docutils literal"><span class="pre">BlockingConnection</span></tt></a></p> +</dd></dl> + +<dl class="class"> +<dt id="kombu.transport.pypika.SyncTransport.Message"> +<em class="property">class </em><tt class="descname">Message</tt><big>(</big><em>channel</em>, <em>amqp_message</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.pypika.SyncTransport.Message" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="kombu.transport.pypika.SyncTransport.close_connection"> +<tt class="descclassname">SyncTransport.</tt><tt class="descname">close_connection</tt><big>(</big><em>connection</em><big>)</big><a class="headerlink" href="#kombu.transport.pypika.SyncTransport.close_connection" title="Permalink to this definition">¶</a></dt> +<dd><p>Close the AMQP broker connection.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.transport.pypika.SyncTransport.create_channel"> +<tt class="descclassname">SyncTransport.</tt><tt class="descname">create_channel</tt><big>(</big><em>connection</em><big>)</big><a class="headerlink" href="#kombu.transport.pypika.SyncTransport.create_channel" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="kombu.transport.pypika.SyncTransport.drain_events"> +<tt class="descclassname">SyncTransport.</tt><tt class="descname">drain_events</tt><big>(</big><em>connection</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.pypika.SyncTransport.drain_events" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="kombu.transport.pypika.SyncTransport.establish_connection"> +<tt class="descclassname">SyncTransport.</tt><tt class="descname">establish_connection</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.pypika.SyncTransport.establish_connection" title="Permalink to this definition">¶</a></dt> +<dd><p>Establish connection to the AMQP broker.</p> +</dd></dl> + +</dd></dl> + +</div> +<div class="section" id="connections"> +<h2><a class="toc-backref" href="#id2">Connections</a><a class="headerlink" href="#connections" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="kombu.transport.pypika.AsyncoreConnection"> +<em class="property">class </em><tt class="descclassname">kombu.transport.pypika.</tt><tt class="descname">AsyncoreConnection</tt><big>(</big><em>parameters</em>, <em>wait_for_open=True</em>, <em>reconnection_strategy=None</em><big>)</big><a class="headerlink" href="#kombu.transport.pypika.AsyncoreConnection" title="Permalink to this definition">¶</a></dt> +<dd><dl class="method"> +<dt id="kombu.transport.pypika.AsyncoreConnection.channel"> +<tt class="descname">channel</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.pypika.AsyncoreConnection.channel" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +<dl class="class"> <dt id="kombu.transport.pypika.BlockingConnection"> <em class="property">class </em><tt class="descclassname">kombu.transport.pypika.</tt><tt class="descname">BlockingConnection</tt><big>(</big><em>parameters</em>, <em>wait_for_open=True</em>, <em>reconnection_strategy=None</em><big>)</big><a class="headerlink" href="#kombu.transport.pypika.BlockingConnection" title="Permalink to this definition">¶</a></dt> <dd><dl class="method"> @@ -85,6 +151,9 @@ </dd></dl> +</div> +<div class="section" id="channel"> +<h2><a class="toc-backref" href="#id3">Channel</a><a class="headerlink" href="#channel" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="kombu.transport.pypika.Channel"> <em class="property">class </em><tt class="descclassname">kombu.transport.pypika.</tt><tt class="descname">Channel</tt><big>(</big><em>handler</em><big>)</big><a class="headerlink" href="#kombu.transport.pypika.Channel" title="Permalink to this definition">¶</a></dt> @@ -127,49 +196,15 @@ </dd></dl> +</div> +<div class="section" id="message"> +<h2><a class="toc-backref" href="#id4">Message</a><a class="headerlink" href="#message" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="kombu.transport.pypika.Message"> <em class="property">class </em><tt class="descclassname">kombu.transport.pypika.</tt><tt class="descname">Message</tt><big>(</big><em>channel</em>, <em>amqp_message</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.pypika.Message" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> -<dl class="class"> -<dt id="kombu.transport.pypika.SyncTransport"> -<em class="property">class </em><tt class="descclassname">kombu.transport.pypika.</tt><tt class="descname">SyncTransport</tt><big>(</big><em>client</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.pypika.SyncTransport" title="Permalink to this definition">¶</a></dt> -<dd><dl class="attribute"> -<dt id="kombu.transport.pypika.SyncTransport.Connection"> -<tt class="descname">Connection</tt><a class="headerlink" href="#kombu.transport.pypika.SyncTransport.Connection" title="Permalink to this definition">¶</a></dt> -<dd><p>alias of <a class="reference internal" href="#kombu.transport.pypika.BlockingConnection" title="kombu.transport.pypika.BlockingConnection"><tt class="xref py py-class docutils literal"><span class="pre">BlockingConnection</span></tt></a></p> -</dd></dl> - -<dl class="class"> -<dt id="kombu.transport.pypika.SyncTransport.Message"> -<em class="property">class </em><tt class="descname">Message</tt><big>(</big><em>channel</em>, <em>amqp_message</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.pypika.SyncTransport.Message" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -<dl class="method"> -<dt id="kombu.transport.pypika.SyncTransport.close_connection"> -<tt class="descclassname">SyncTransport.</tt><tt class="descname">close_connection</tt><big>(</big><em>connection</em><big>)</big><a class="headerlink" href="#kombu.transport.pypika.SyncTransport.close_connection" title="Permalink to this definition">¶</a></dt> -<dd><p>Close the AMQP broker connection.</p> -</dd></dl> - -<dl class="method"> -<dt id="kombu.transport.pypika.SyncTransport.create_channel"> -<tt class="descclassname">SyncTransport.</tt><tt class="descname">create_channel</tt><big>(</big><em>connection</em><big>)</big><a class="headerlink" href="#kombu.transport.pypika.SyncTransport.create_channel" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -<dl class="method"> -<dt id="kombu.transport.pypika.SyncTransport.drain_events"> -<tt class="descclassname">SyncTransport.</tt><tt class="descname">drain_events</tt><big>(</big><em>connection</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.pypika.SyncTransport.drain_events" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -<dl class="method"> -<dt id="kombu.transport.pypika.SyncTransport.establish_connection"> -<tt class="descclassname">SyncTransport.</tt><tt class="descname">establish_connection</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.pypika.SyncTransport.establish_connection" title="Permalink to this definition">¶</a></dt> -<dd><p>Establish connection to the AMQP broker.</p> -</dd></dl> - -</dd></dl> - +</div> </div> @@ -180,12 +215,23 @@ <div class="sphinxsidebarwrapper"><p class="logo"><a href="../index.html"> <img class="logo" width="128" height="128" src="http://cloud.github.com/downloads/ask/kombu/kombusmall.jpg" alt="Logo"/> </a></p> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">kombu.transport.pypika</a><ul> +<li><a class="reference internal" href="#transports">Transports</a></li> +<li><a class="reference internal" href="#connections">Connections</a></li> +<li><a class="reference internal" href="#channel">Channel</a></li> +<li><a class="reference internal" href="#message">Message</a></li> +</ul> +</li> +</ul> + <h4>Previous topic</h4> <p class="topless"><a href="kombu.transport.html" - title="previous chapter">Transports - kombu.transport</a></p> + title="previous chapter"><no title></a></p> <h4>Next topic</h4> <p class="topless"><a href="kombu.transport.pyamqplib.html" - title="next chapter">amqplib Transport - kombu.transport.pyamqplib</a></p> + title="next chapter">kombu.transport.pyamqplib</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../sources/reference/kombu.transport.pypika.txt" @@ -218,18 +264,18 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.transport.pyamqplib.html" title="amqplib Transport - kombu.transport.pyamqplib" + <a href="kombu.transport.pyamqplib.html" title="kombu.transport.pyamqplib" >next</a> |</li> <li class="right" > - <a href="kombu.transport.html" title="Transports - kombu.transport" + <a href="kombu.transport.html" title="<no title>" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.transport.pyredis.html b/reference/kombu.transport.pyredis.html index 70cc708c..254d02b1 100644 --- a/reference/kombu.transport.pyredis.html +++ b/reference/kombu.transport.pyredis.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Redis Transport - kombu.transport.pyredis — Kombu v0.9.0 documentation</title> + <title>kombu.transport.pyredis — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,10 +21,10 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> - <link rel="next" title="In-memory Transport - kombu.transport.memory" href="kombu.transport.memory.html" /> - <link rel="prev" title="amqplib Transport - kombu.transport.pyamqplib" href="kombu.transport.pyamqplib.html" /> + <link rel="next" title="kombu.transport.memory" href="kombu.transport.memory.html" /> + <link rel="prev" title="kombu.transport.pyamqplib" href="kombu.transport.pyamqplib.html" /> </head> <body> <div class="related"> @@ -37,12 +37,12 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.transport.memory.html" title="In-memory Transport - kombu.transport.memory" + <a href="kombu.transport.memory.html" title="kombu.transport.memory" accesskey="N">next</a> |</li> <li class="right" > - <a href="kombu.transport.pyamqplib.html" title="amqplib Transport - kombu.transport.pyamqplib" + <a href="kombu.transport.pyamqplib.html" title="kombu.transport.pyamqplib" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -52,23 +52,31 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="redis-transport-kombu-transport-pyredis"> -<h1>Redis Transport - kombu.transport.pyredis<a class="headerlink" href="#redis-transport-kombu-transport-pyredis" title="Permalink to this headline">¶</a></h1> -<span class="target" id="module-kombu.transport.pyredis"></span><dl class="class"> -<dt id="kombu.transport.pyredis.Channel"> -<em class="property">class </em><tt class="descclassname">kombu.transport.pyredis.</tt><tt class="descname">Channel</tt><big>(</big><em>connection</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.pyredis.Channel" title="Permalink to this definition">¶</a></dt> -<dd><dl class="attribute"> -<dt id="kombu.transport.pyredis.Channel.client"> -<tt class="descname">client</tt><a class="headerlink" href="#kombu.transport.pyredis.Channel.client" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -<dl class="method"> -<dt id="kombu.transport.pyredis.Channel.close"> -<tt class="descname">close</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.pyredis.Channel.close" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - -</dd></dl> - + <span class="target" id="module-kombu.transport.pyredis"></span><div class="section" id="kombu-transport-pyredis"> +<h1>kombu.transport.pyredis<a class="headerlink" href="#kombu-transport-pyredis" title="Permalink to this headline">¶</a></h1> +<p>Redis transport.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3"> +<li>2009 - 2010 by Ask Solem.</li> +</ol> +</td> +</tr> +<tr class="field"><th class="field-name">license:</th><td class="field-body"><p class="first last">BSD, see LICENSE for more details.</p> +</td> +</tr> +</tbody> +</table> +<div class="contents local topic" id="contents"> +<ul class="simple"> +<li><a class="reference internal" href="#transport" id="id1">Transport</a></li> +<li><a class="reference internal" href="#channel" id="id2">Channel</a></li> +</ul> +</div> +<div class="section" id="transport"> +<h2><a class="toc-backref" href="#id1">Transport</a><a class="headerlink" href="#transport" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="kombu.transport.pyredis.Transport"> <em class="property">class </em><tt class="descclassname">kombu.transport.pyredis.</tt><tt class="descname">Transport</tt><big>(</big><em>client</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.pyredis.Transport" title="Permalink to this definition">¶</a></dt> @@ -85,11 +93,40 @@ <tt class="descname">close</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.pyredis.Transport.Channel.close" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> +<dl class="method"> +<dt id="kombu.transport.pyredis.Transport.Channel.get_table"> +<tt class="descname">get_table</tt><big>(</big><em>exchange</em><big>)</big><a class="headerlink" href="#kombu.transport.pyredis.Transport.Channel.get_table" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + </dd></dl> </dd></dl> </div> +<div class="section" id="channel"> +<h2><a class="toc-backref" href="#id2">Channel</a><a class="headerlink" href="#channel" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="kombu.transport.pyredis.Channel"> +<em class="property">class </em><tt class="descclassname">kombu.transport.pyredis.</tt><tt class="descname">Channel</tt><big>(</big><em>connection</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.pyredis.Channel" title="Permalink to this definition">¶</a></dt> +<dd><dl class="attribute"> +<dt id="kombu.transport.pyredis.Channel.client"> +<tt class="descname">client</tt><a class="headerlink" href="#kombu.transport.pyredis.Channel.client" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="kombu.transport.pyredis.Channel.close"> +<tt class="descname">close</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.pyredis.Channel.close" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="method"> +<dt id="kombu.transport.pyredis.Channel.get_table"> +<tt class="descname">get_table</tt><big>(</big><em>exchange</em><big>)</big><a class="headerlink" href="#kombu.transport.pyredis.Channel.get_table" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +</dd></dl> + +</div> +</div> </div> @@ -99,12 +136,21 @@ <div class="sphinxsidebarwrapper"><p class="logo"><a href="../index.html"> <img class="logo" width="128" height="128" src="http://cloud.github.com/downloads/ask/kombu/kombusmall.jpg" alt="Logo"/> </a></p> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">kombu.transport.pyredis</a><ul> +<li><a class="reference internal" href="#transport">Transport</a></li> +<li><a class="reference internal" href="#channel">Channel</a></li> +</ul> +</li> +</ul> + <h4>Previous topic</h4> <p class="topless"><a href="kombu.transport.pyamqplib.html" - title="previous chapter">amqplib Transport - kombu.transport.pyamqplib</a></p> + title="previous chapter">kombu.transport.pyamqplib</a></p> <h4>Next topic</h4> <p class="topless"><a href="kombu.transport.memory.html" - title="next chapter">In-memory Transport - kombu.transport.memory</a></p> + title="next chapter">kombu.transport.memory</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../sources/reference/kombu.transport.pyredis.txt" @@ -137,18 +183,18 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.transport.memory.html" title="In-memory Transport - kombu.transport.memory" + <a href="kombu.transport.memory.html" title="kombu.transport.memory" >next</a> |</li> <li class="right" > - <a href="kombu.transport.pyamqplib.html" title="amqplib Transport - kombu.transport.pyamqplib" + <a href="kombu.transport.pyamqplib.html" title="kombu.transport.pyamqplib" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.transport.virtual.html b/reference/kombu.transport.virtual.html index 877da20f..40cc04a7 100644 --- a/reference/kombu.transport.virtual.html +++ b/reference/kombu.transport.virtual.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Virtual Transport Interface - kombu.transport.virtual — Kombu v0.9.0 documentation</title> + <title>kombu.transport.virtual — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,10 +21,10 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> - <link rel="next" title="Serialization - kombu.serialization" href="kombu.serialization.html" /> - <link rel="prev" title="Base Transport Interface - kombu.transport.base" href="kombu.transport.base.html" /> + <link rel="next" title="kombu.transport.virtual.exchange" href="kombu.transport.virtual.exchange.html" /> + <link rel="prev" title="kombu.transport.base" href="kombu.transport.base.html" /> </head> <body> <div class="related"> @@ -37,12 +37,12 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.serialization.html" title="Serialization - kombu.serialization" + <a href="kombu.transport.virtual.exchange.html" title="kombu.transport.virtual.exchange" accesskey="N">next</a> |</li> <li class="right" > - <a href="kombu.transport.base.html" title="Base Transport Interface - kombu.transport.base" + <a href="kombu.transport.base.html" title="kombu.transport.base" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -52,332 +52,502 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="virtual-transport-interface-kombu-transport-virtual"> -<h1>Virtual Transport Interface - kombu.transport.virtual<a class="headerlink" href="#virtual-transport-interface-kombu-transport-virtual" title="Permalink to this headline">¶</a></h1> -<span class="target" id="module-kombu.transport.virtual"></span><dl class="class"> -<dt id="kombu.transport.virtual.Channel"> -<em class="property">class </em><tt class="descclassname">kombu.transport.virtual.</tt><tt class="descname">Channel</tt><big>(</big><em>connection</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel" title="Permalink to this definition">¶</a></dt> -<dd><dl class="class"> -<dt id="kombu.transport.virtual.Channel.Message"> -<em class="property">class </em><tt class="descname">Message</tt><big>(</big><em>channel</em>, <em>payload</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.Message" title="Permalink to this definition">¶</a></dt> -<dd><dl class="method"> -<dt id="kombu.transport.virtual.Channel.Message.reject"> -<tt class="descname">reject</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.Message.reject" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> + <span class="target" id="module-kombu.transport.virtual"></span><div class="section" id="kombu-transport-virtual"> +<h1>kombu.transport.virtual<a class="headerlink" href="#kombu-transport-virtual" title="Permalink to this headline">¶</a></h1> +<p>Virtual transport implementation.</p> +<p>Emulates the AMQ API for non-AMQ transports.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">copyright:</th><td class="field-body"><ol class="first loweralpha simple" start="3"> +<li>2009, 2010 by Ask Solem.</li> +</ol> +</td> +</tr> +<tr class="field"><th class="field-name">license:</th><td class="field-body"><p class="first last">BSD, see LICENSE for more details.</p> +</td> +</tr> +</tbody> +</table> +<div class="contents local topic" id="contents"> +<ul class="simple"> +<li><a class="reference internal" href="#transports" id="id1">Transports</a></li> +<li><a class="reference internal" href="#channel" id="id2">Channel</a></li> +<li><a class="reference internal" href="#message" id="id3">Message</a></li> +<li><a class="reference internal" href="#quality-of-service" id="id4">Quality Of Service</a></li> +<li><a class="reference internal" href="#in-memory-state" id="id5">In-memory State</a></li> +</ul> +</div> +<div class="section" id="transports"> +<h2><a class="toc-backref" href="#id1">Transports</a><a class="headerlink" href="#transports" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="kombu.transport.virtual.Transport"> +<em class="property">class </em><tt class="descclassname">kombu.transport.virtual.</tt><tt class="descname">Transport</tt><big>(</big><em>client</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport" title="Permalink to this definition">¶</a></dt> +<dd><p>Virtual transport.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>client</strong> – <a class="reference internal" href="kombu.connection.html#kombu.connection.BrokerConnection" title="kombu.connection.BrokerConnection"><tt class="xref py py-class docutils literal"><span class="pre">BrokerConnection</span></tt></a> instance</li> +</ul> +</td> +</tr> +</tbody> +</table> +<dl class="attribute"> +<dt id="kombu.transport.virtual.Transport.Channel"> +<tt class="descname">Channel</tt><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel" title="Permalink to this definition">¶</a></dt> +<dd><p>channel class used.</p> +</dd></dl> +<dl class="attribute"> +<dt id="kombu.transport.virtual.Transport.Cycle"> +<tt class="descname">Cycle</tt><a class="headerlink" href="#kombu.transport.virtual.Transport.Cycle" title="Permalink to this definition">¶</a></dt> +<dd><p>Consume from a set of resources, where each resource gets +an equal chance to be consumed from.</p> </dd></dl> -<dl class="method"> -<dt id="kombu.transport.virtual.Channel.basic_ack"> -<tt class="descclassname">Channel.</tt><tt class="descname">basic_ack</tt><big>(</big><em>delivery_tag</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.basic_ack" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dl class="attribute"> +<dt id="kombu.transport.virtual.Transport.interval"> +<tt class="descname">interval</tt><a class="headerlink" href="#kombu.transport.virtual.Transport.interval" title="Permalink to this definition">¶</a></dt> +<dd><p>default interval between polling channels for new events.</p> +</dd></dl> -<dl class="method"> -<dt id="kombu.transport.virtual.Channel.basic_cancel"> -<tt class="descclassname">Channel.</tt><tt class="descname">basic_cancel</tt><big>(</big><em>consumer_tag</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.basic_cancel" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dl class="attribute"> +<dt id="kombu.transport.virtual.Transport.default_port"> +<tt class="descname">default_port</tt><a class="headerlink" href="#kombu.transport.virtual.Transport.default_port" title="Permalink to this definition">¶</a></dt> +<dd><p>port number used when no port is specified.</p> +</dd></dl> -<dl class="method"> -<dt id="kombu.transport.virtual.Channel.basic_consume"> -<tt class="descclassname">Channel.</tt><tt class="descname">basic_consume</tt><big>(</big><em>queue</em>, <em>no_ack</em>, <em>callback</em>, <em>consumer_tag</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.basic_consume" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dl class="attribute"> +<dt id="kombu.transport.virtual.Transport.state"> +<tt class="descname">state</tt><a class="headerlink" href="#kombu.transport.virtual.Transport.state" title="Permalink to this definition">¶</a></dt> +<dd><p><a class="reference internal" href="#kombu.transport.virtual.BrokerState" title="kombu.transport.virtual.BrokerState"><tt class="xref py py-class docutils literal"><span class="pre">BrokerState</span></tt></a> containing declared exchanges and +bindings (set by constructor).</p> +</dd></dl> -<dl class="method"> -<dt id="kombu.transport.virtual.Channel.basic_get"> -<tt class="descclassname">Channel.</tt><tt class="descname">basic_get</tt><big>(</big><em>queue</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.basic_get" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dl class="attribute"> +<dt id="kombu.transport.virtual.Transport.cycle"> +<tt class="descname">cycle</tt><a class="headerlink" href="#kombu.transport.virtual.Transport.cycle" title="Permalink to this definition">¶</a></dt> +<dd><p><a class="reference internal" href="kombu.transport.virtual.scheduling.html#kombu.transport.virtual.scheduling.FairCycle" title="kombu.transport.virtual.scheduling.FairCycle"><tt class="xref py py-class docutils literal"><span class="pre">FairCycle</span></tt></a> instance +used to fairly drain events from channels (set by constructor).</p> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Channel.basic_publish"> -<tt class="descclassname">Channel.</tt><tt class="descname">basic_publish</tt><big>(</big><em>message</em>, <em>exchange</em>, <em>routing_key</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.basic_publish" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.transport.virtual.Transport.establish_connection"> +<tt class="descname">establish_connection</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.establish_connection" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Channel.basic_qos"> -<tt class="descclassname">Channel.</tt><tt class="descname">basic_qos</tt><big>(</big><em>prefetch_size</em>, <em>prefetch_count</em>, <em>apply_global=False</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.basic_qos" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.transport.virtual.Transport.close_connection"> +<tt class="descname">close_connection</tt><big>(</big><em>connection</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.close_connection" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Channel.basic_recover"> -<tt class="descclassname">Channel.</tt><tt class="descname">basic_recover</tt><big>(</big><em>requeue=False</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.basic_recover" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.transport.virtual.Transport.create_channel"> +<tt class="descname">create_channel</tt><big>(</big><em>connection</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.create_channel" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Channel.basic_reject"> -<tt class="descclassname">Channel.</tt><tt class="descname">basic_reject</tt><big>(</big><em>delivery_tag</em>, <em>requeue=False</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.basic_reject" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.transport.virtual.Transport.close_channel"> +<tt class="descname">close_channel</tt><big>(</big><em>channel</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.close_channel" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Channel.close"> -<tt class="descclassname">Channel.</tt><tt class="descname">close</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.close" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.transport.virtual.Transport.drain_events"> +<tt class="descname">drain_events</tt><big>(</big><em>connection</em>, <em>timeout=None</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.drain_events" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> -<dl class="method"> -<dt id="kombu.transport.virtual.Channel.drain_events"> -<tt class="descclassname">Channel.</tt><tt class="descname">drain_events</tt><big>(</big><em>timeout=None</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.drain_events" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +</dd></dl> -<dl class="method"> -<dt id="kombu.transport.virtual.Channel.exchange_declare"> -<tt class="descclassname">Channel.</tt><tt class="descname">exchange_declare</tt><big>(</big><em>exchange</em>, <em>type='direct'</em>, <em>durable=False</em>, <em>auto_delete=False</em>, <em>arguments=None</em>, <em>nowait=False</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.exchange_declare" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +</div> +<div class="section" id="channel"> +<h2><a class="toc-backref" href="#id2">Channel</a><a class="headerlink" href="#channel" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="kombu.transport.virtual.AbstractChannel"> +<em class="property">class </em><tt class="descclassname">kombu.transport.virtual.</tt><tt class="descname">AbstractChannel</tt><a class="headerlink" href="#kombu.transport.virtual.AbstractChannel" title="Permalink to this definition">¶</a></dt> +<dd><p>This is an abstract class defining the channel methods +you’d usually want to implement in a virtual channel.</p> +<p>Do not subclass directly, but rather inherit from <a class="reference internal" href="#kombu.transport.virtual.Channel" title="kombu.transport.virtual.Channel"><tt class="xref py py-class docutils literal"><span class="pre">Channel</span></tt></a> +instead.</p> +</dd></dl> -<dl class="method"> -<dt id="kombu.transport.virtual.Channel.exchange_delete"> -<tt class="descclassname">Channel.</tt><tt class="descname">exchange_delete</tt><big>(</big><em>exchange</em>, <em>if_unused=False</em>, <em>nowait=False</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.exchange_delete" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dl class="class"> +<dt id="kombu.transport.virtual.Channel"> +<em class="property">class </em><tt class="descclassname">kombu.transport.virtual.</tt><tt class="descname">Channel</tt><big>(</big><em>connection</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel" title="Permalink to this definition">¶</a></dt> +<dd><p>Virtual channel.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>connection</strong> – The transport instance this channel is part of.</li> +</ul> +</td> +</tr> +</tbody> +</table> +<dl class="attribute"> +<dt id="kombu.transport.virtual.Channel.Message"> +<tt class="descname">Message</tt><a class="headerlink" href="#kombu.transport.virtual.Channel.Message" title="Permalink to this definition">¶</a></dt> +<dd><p>message class used.</p> +</dd></dl> -<dl class="method"> -<dt id="kombu.transport.virtual.Channel.flow"> -<tt class="descclassname">Channel.</tt><tt class="descname">flow</tt><big>(</big><em>active=True</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.flow" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dl class="attribute"> +<dt id="kombu.transport.virtual.Channel.state"> +<tt class="descname">state</tt><a class="headerlink" href="#kombu.transport.virtual.Channel.state" title="Permalink to this definition">¶</a></dt> +<dd><p>Broker state containing exchanges and bindings.</p> +</dd></dl> -<dl class="method"> -<dt id="kombu.transport.virtual.Channel.message_to_python"> -<tt class="descclassname">Channel.</tt><tt class="descname">message_to_python</tt><big>(</big><em>raw_message</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.message_to_python" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dl class="attribute"> +<dt id="kombu.transport.virtual.Channel.qos"> +<tt class="descname">qos</tt><a class="headerlink" href="#kombu.transport.virtual.Channel.qos" title="Permalink to this definition">¶</a></dt> +<dd><p><a class="reference internal" href="#kombu.transport.virtual.QoS" title="kombu.transport.virtual.QoS"><tt class="xref py py-class docutils literal"><span class="pre">QoS</span></tt></a> manager for this channel.</p> +</dd></dl> -<dl class="method"> -<dt id="kombu.transport.virtual.Channel.prepare_message"> -<tt class="descclassname">Channel.</tt><tt class="descname">prepare_message</tt><big>(</big><em>message_data</em>, <em>priority=None</em>, <em>content_type=None</em>, <em>content_encoding=None</em>, <em>headers=None</em>, <em>properties=None</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.prepare_message" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dl class="attribute"> +<dt id="kombu.transport.virtual.Channel.do_restore"> +<tt class="descname">do_restore</tt><a class="headerlink" href="#kombu.transport.virtual.Channel.do_restore" title="Permalink to this definition">¶</a></dt> +<dd><p>flag to restore unacked messages when channel +goes out of scope.</p> +</dd></dl> <dl class="attribute"> -<dt id="kombu.transport.virtual.Channel.qos_manager"> -<tt class="descclassname">Channel.</tt><tt class="descname">qos_manager</tt><a class="headerlink" href="#kombu.transport.virtual.Channel.qos_manager" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.Channel.exchange_types"> +<tt class="descname">exchange_types</tt><a class="headerlink" href="#kombu.transport.virtual.Channel.exchange_types" title="Permalink to this definition">¶</a></dt> +<dd><p>mapping of exchange types and corresponding classes.</p> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Channel.queue_bind"> -<tt class="descclassname">Channel.</tt><tt class="descname">queue_bind</tt><big>(</big><em>queue</em>, <em>exchange</em>, <em>routing_key</em>, <em>arguments=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.queue_bind" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.Channel.exchange_declare"> +<tt class="descname">exchange_declare</tt><big>(</big><em>exchange</em>, <em>type='direct'</em>, <em>durable=False</em>, <em>auto_delete=False</em>, <em>arguments=None</em>, <em>nowait=False</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.exchange_declare" title="Permalink to this definition">¶</a></dt> +<dd><p>Declare exchange.</p> +</dd></dl> + +<dl class="method"> +<dt id="kombu.transport.virtual.Channel.exchange_delete"> +<tt class="descname">exchange_delete</tt><big>(</big><em>exchange</em>, <em>if_unused=False</em>, <em>nowait=False</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.exchange_delete" title="Permalink to this definition">¶</a></dt> +<dd><p>Delete <cite>exchange</cite> and all its bindings.</p> +</dd></dl> <dl class="method"> <dt id="kombu.transport.virtual.Channel.queue_declare"> -<tt class="descclassname">Channel.</tt><tt class="descname">queue_declare</tt><big>(</big><em>queue</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.queue_declare" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<tt class="descname">queue_declare</tt><big>(</big><em>queue</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.queue_declare" title="Permalink to this definition">¶</a></dt> +<dd><p>Declare queue.</p> +</dd></dl> <dl class="method"> <dt id="kombu.transport.virtual.Channel.queue_delete"> -<tt class="descclassname">Channel.</tt><tt class="descname">queue_delete</tt><big>(</big><em>queue</em>, <em>if_unusued=False</em>, <em>if_empty=False</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.queue_delete" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<tt class="descname">queue_delete</tt><big>(</big><em>queue</em>, <em>if_unusued=False</em>, <em>if_empty=False</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.queue_delete" title="Permalink to this definition">¶</a></dt> +<dd><p>Delete queue.</p> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Channel.queue_purge"> -<tt class="descclassname">Channel.</tt><tt class="descname">queue_purge</tt><big>(</big><em>queue</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.queue_purge" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - +<dt id="kombu.transport.virtual.Channel.queue_bind"> +<tt class="descname">queue_bind</tt><big>(</big><em>queue</em>, <em>exchange</em>, <em>routing_key</em>, <em>arguments=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.queue_bind" title="Permalink to this definition">¶</a></dt> +<dd><p>Bind <cite>queue</cite> to <cite>exchange</cite> with <cite>routing key</cite>.</p> </dd></dl> -<dl class="class"> -<dt id="kombu.transport.virtual.FairCycle"> -<em class="property">class </em><tt class="descclassname">kombu.transport.virtual.</tt><tt class="descname">FairCycle</tt><big>(</big><em>fun</em>, <em>resources</em>, <em>predicate=<class 'Queue.Empty'></em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.FairCycle" title="Permalink to this definition">¶</a></dt> -<dd><p>Consume from a set of resources, where each resource gets -an equal chance to be consumed from.</p> <dl class="method"> -<dt id="kombu.transport.virtual.FairCycle.get"> -<tt class="descname">get</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.FairCycle.get" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - +<dt id="kombu.transport.virtual.Channel.queue_purge"> +<tt class="descname">queue_purge</tt><big>(</big><em>queue</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.queue_purge" title="Permalink to this definition">¶</a></dt> +<dd><p>Remove all ready messages from queue.</p> </dd></dl> -<dl class="class"> -<dt id="kombu.transport.virtual.Message"> -<em class="property">class </em><tt class="descclassname">kombu.transport.virtual.</tt><tt class="descname">Message</tt><big>(</big><em>channel</em>, <em>payload</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Message" title="Permalink to this definition">¶</a></dt> -<dd><dl class="method"> -<dt id="kombu.transport.virtual.Message.reject"> -<tt class="descname">reject</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Message.reject" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - +<dl class="method"> +<dt id="kombu.transport.virtual.Channel.basic_publish"> +<tt class="descname">basic_publish</tt><big>(</big><em>message</em>, <em>exchange</em>, <em>routing_key</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.basic_publish" title="Permalink to this definition">¶</a></dt> +<dd><p>Publish message.</p> </dd></dl> -<dl class="class"> -<dt id="kombu.transport.virtual.QualityOfService"> -<em class="property">class </em><tt class="descclassname">kombu.transport.virtual.</tt><tt class="descname">QualityOfService</tt><big>(</big><em>channel</em>, <em>prefetch_count=None</em>, <em>interval=None</em>, <em>do_restore=True</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.QualityOfService" title="Permalink to this definition">¶</a></dt> -<dd><dl class="method"> -<dt id="kombu.transport.virtual.QualityOfService.ack"> -<tt class="descname">ack</tt><big>(</big><em>delivery_tag</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.QualityOfService.ack" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - <dl class="method"> -<dt id="kombu.transport.virtual.QualityOfService.append"> -<tt class="descname">append</tt><big>(</big><em>message</em>, <em>delivery_tag</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.QualityOfService.append" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.Channel.basic_consume"> +<tt class="descname">basic_consume</tt><big>(</big><em>queue</em>, <em>no_ack</em>, <em>callback</em>, <em>consumer_tag</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.basic_consume" title="Permalink to this definition">¶</a></dt> +<dd><p>Consume from <cite>queue</cite></p> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.QualityOfService.can_consume"> -<tt class="descname">can_consume</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.QualityOfService.can_consume" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.Channel.basic_cancel"> +<tt class="descname">basic_cancel</tt><big>(</big><em>consumer_tag</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.basic_cancel" title="Permalink to this definition">¶</a></dt> +<dd><p>Cancel consumer by consumer tag.</p> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.QualityOfService.requeue"> -<tt class="descname">requeue</tt><big>(</big><em>delivery_tag</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.QualityOfService.requeue" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.Channel.basic_get"> +<tt class="descname">basic_get</tt><big>(</big><em>queue</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.basic_get" title="Permalink to this definition">¶</a></dt> +<dd><p>Get message by direct access (synchronous).</p> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.QualityOfService.restore_unacked"> -<tt class="descname">restore_unacked</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.QualityOfService.restore_unacked" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.Channel.basic_ack"> +<tt class="descname">basic_ack</tt><big>(</big><em>delivery_tag</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.basic_ack" title="Permalink to this definition">¶</a></dt> +<dd><p>Acknowledge message.</p> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.QualityOfService.restore_unacked_once"> -<tt class="descname">restore_unacked_once</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.QualityOfService.restore_unacked_once" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - +<dt id="kombu.transport.virtual.Channel.basic_recover"> +<tt class="descname">basic_recover</tt><big>(</big><em>requeue=False</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.basic_recover" title="Permalink to this definition">¶</a></dt> +<dd><p>Recover unacked messages.</p> </dd></dl> -<dl class="class"> -<dt id="kombu.transport.virtual.Transport"> -<em class="property">class </em><tt class="descclassname">kombu.transport.virtual.</tt><tt class="descname">Transport</tt><big>(</big><em>client</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport" title="Permalink to this definition">¶</a></dt> -<dd><dl class="class"> -<dt id="kombu.transport.virtual.Transport.Channel"> -<em class="property">class </em><tt class="descname">Channel</tt><big>(</big><em>connection</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel" title="Permalink to this definition">¶</a></dt> -<dd><dl class="class"> -<dt id="kombu.transport.virtual.Transport.Channel.Message"> -<em class="property">class </em><tt class="descname">Message</tt><big>(</big><em>channel</em>, <em>payload</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.Message" title="Permalink to this definition">¶</a></dt> -<dd><dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.Message.reject"> -<tt class="descname">reject</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.Message.reject" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> - +<dl class="method"> +<dt id="kombu.transport.virtual.Channel.basic_reject"> +<tt class="descname">basic_reject</tt><big>(</big><em>delivery_tag</em>, <em>requeue=False</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.basic_reject" title="Permalink to this definition">¶</a></dt> +<dd><p>Reject message.</p> </dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.basic_ack"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">basic_ack</tt><big>(</big><em>delivery_tag</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.basic_ack" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.Channel.basic_qos"> +<tt class="descname">basic_qos</tt><big>(</big><em>prefetch_size</em>, <em>prefetch_count</em>, <em>apply_global=False</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.basic_qos" title="Permalink to this definition">¶</a></dt> +<dd><p>Change QoS settings for this channel.</p> +<p>Only <cite>prefetch_count</cite> is supported.</p> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.basic_cancel"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">basic_cancel</tt><big>(</big><em>consumer_tag</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.basic_cancel" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.Channel.get_table"> +<tt class="descname">get_table</tt><big>(</big><em>exchange</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.get_table" title="Permalink to this definition">¶</a></dt> +<dd><p>Get table of bindings for <cite>exchange</cite>.</p> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.basic_consume"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">basic_consume</tt><big>(</big><em>queue</em>, <em>no_ack</em>, <em>callback</em>, <em>consumer_tag</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.basic_consume" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.Channel.typeof"> +<tt class="descname">typeof</tt><big>(</big><em>exchange</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.typeof" title="Permalink to this definition">¶</a></dt> +<dd><p>Get the exchange type instance for <cite>exchange</cite>.</p> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.basic_get"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">basic_get</tt><big>(</big><em>queue</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.basic_get" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.transport.virtual.Channel.drain_events"> +<tt class="descname">drain_events</tt><big>(</big><em>timeout=None</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.drain_events" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.basic_publish"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">basic_publish</tt><big>(</big><em>message</em>, <em>exchange</em>, <em>routing_key</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.basic_publish" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.Channel.prepare_message"> +<tt class="descname">prepare_message</tt><big>(</big><em>message_data</em>, <em>priority=None</em>, <em>content_type=None</em>, <em>content_encoding=None</em>, <em>headers=None</em>, <em>properties=None</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.prepare_message" title="Permalink to this definition">¶</a></dt> +<dd><p>Prepare message data.</p> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.basic_qos"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">basic_qos</tt><big>(</big><em>prefetch_size</em>, <em>prefetch_count</em>, <em>apply_global=False</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.basic_qos" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.Channel.message_to_python"> +<tt class="descname">message_to_python</tt><big>(</big><em>raw_message</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.message_to_python" title="Permalink to this definition">¶</a></dt> +<dd><p>Convert raw message to <a class="reference internal" href="#kombu.transport.virtual.Message" title="kombu.transport.virtual.Message"><tt class="xref py py-class docutils literal"><span class="pre">Message</span></tt></a> instance.</p> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.basic_recover"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">basic_recover</tt><big>(</big><em>requeue=False</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.basic_recover" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.Channel.flow"> +<tt class="descname">flow</tt><big>(</big><em>active=True</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.flow" title="Permalink to this definition">¶</a></dt> +<dd><p>Enable/disable message flow.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name" colspan="2">Raises NotImplementedError:</th></tr> +<tr><td> </td><td class="field-body">as flow +is not implemented by the base virtual implementation.</td> +</tr> +</tbody> +</table> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.basic_reject"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">basic_reject</tt><big>(</big><em>delivery_tag</em>, <em>requeue=False</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.basic_reject" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.Channel.close"> +<tt class="descname">close</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Channel.close" title="Permalink to this definition">¶</a></dt> +<dd><p>Close channel, cancel all consumers, and requeue unacked +messages.</p> +</dd></dl> -<dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.close"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">close</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.close" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +</dd></dl> -<dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.drain_events"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">drain_events</tt><big>(</big><em>timeout=None</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.drain_events" title="Permalink to this definition">¶</a></dt> +</div> +<div class="section" id="message"> +<h2><a class="toc-backref" href="#id3">Message</a><a class="headerlink" href="#message" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="kombu.transport.virtual.Message"> +<em class="property">class </em><tt class="descclassname">kombu.transport.virtual.</tt><tt class="descname">Message</tt><big>(</big><em>channel</em>, <em>payload</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Message" title="Permalink to this definition">¶</a></dt> +<dd><dl class="exception"> +<dt id="kombu.transport.virtual.Message.MessageStateError"> +<em class="property">exception </em><tt class="descname">MessageStateError</tt><a class="headerlink" href="#kombu.transport.virtual.Message.MessageStateError" title="Permalink to this definition">¶</a></dt> +<dd><p>The message has already been acknowledged.</p> +<dl class="attribute"> +<dt id="kombu.transport.virtual.Message.MessageStateError.args"> +<tt class="descname">args</tt><a class="headerlink" href="#kombu.transport.virtual.Message.MessageStateError.args" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> -<dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.exchange_declare"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">exchange_declare</tt><big>(</big><em>exchange</em>, <em>type='direct'</em>, <em>durable=False</em>, <em>auto_delete=False</em>, <em>arguments=None</em>, <em>nowait=False</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.exchange_declare" title="Permalink to this definition">¶</a></dt> +<dl class="attribute"> +<dt id="kombu.transport.virtual.Message.MessageStateError.message"> +<tt class="descname">message</tt><a class="headerlink" href="#kombu.transport.virtual.Message.MessageStateError.message" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> -<dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.exchange_delete"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">exchange_delete</tt><big>(</big><em>exchange</em>, <em>if_unused=False</em>, <em>nowait=False</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.exchange_delete" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.flow"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">flow</tt><big>(</big><em>active=True</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.flow" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.Message.ack"> +<tt class="descclassname">Message.</tt><tt class="descname">ack</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Message.ack" title="Permalink to this definition">¶</a></dt> +<dd><p>Acknowledge this message as being processed., +This will remove the message from the queue.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name" colspan="2">Raises MessageStateError:</th></tr> +<tr><td> </td><td class="field-body">If the message has already been +acknowledged/requeued/rejected.</td> +</tr> +</tbody> +</table> +</dd></dl> -<dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.message_to_python"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">message_to_python</tt><big>(</big><em>raw_message</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.message_to_python" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dl class="attribute"> +<dt id="kombu.transport.virtual.Message.acknowledged"> +<tt class="descclassname">Message.</tt><tt class="descname">acknowledged</tt><a class="headerlink" href="#kombu.transport.virtual.Message.acknowledged" title="Permalink to this definition">¶</a></dt> +<dd><p>Set to true if the message has been acknowledged.</p> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.prepare_message"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">prepare_message</tt><big>(</big><em>message_data</em>, <em>priority=None</em>, <em>content_type=None</em>, <em>content_encoding=None</em>, <em>headers=None</em>, <em>properties=None</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.prepare_message" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.Message.decode"> +<tt class="descclassname">Message.</tt><tt class="descname">decode</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Message.decode" title="Permalink to this definition">¶</a></dt> +<dd><p>Deserialize the message body, returning the original +python structure sent by the publisher.</p> +</dd></dl> <dl class="attribute"> -<dt id="kombu.transport.virtual.Transport.Channel.qos_manager"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">qos_manager</tt><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.qos_manager" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.Message.payload"> +<tt class="descclassname">Message.</tt><tt class="descname">payload</tt><a class="headerlink" href="#kombu.transport.virtual.Message.payload" title="Permalink to this definition">¶</a></dt> +<dd><p>The decoded message body.</p> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.queue_bind"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">queue_bind</tt><big>(</big><em>queue</em>, <em>exchange</em>, <em>routing_key</em>, <em>arguments=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.queue_bind" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.Message.reject"> +<tt class="descclassname">Message.</tt><tt class="descname">reject</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Message.reject" title="Permalink to this definition">¶</a></dt> +<dd><p>Reject this message.</p> +<p>The message will be discarded by the server.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name" colspan="2">Raises MessageStateError:</th></tr> +<tr><td> </td><td class="field-body">If the message has already been +acknowledged/requeued/rejected.</td> +</tr> +</tbody> +</table> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.queue_declare"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">queue_declare</tt><big>(</big><em>queue</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.queue_declare" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.Message.requeue"> +<tt class="descclassname">Message.</tt><tt class="descname">requeue</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Message.requeue" title="Permalink to this definition">¶</a></dt> +<dd><p>Reject this message and put it back on the queue.</p> +<p>You must not use this method as a means of selecting messages +to process.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name" colspan="2">Raises MessageStateError:</th></tr> +<tr><td> </td><td class="field-body">If the message has already been +acknowledged/requeued/rejected.</td> +</tr> +</tbody> +</table> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.queue_delete"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">queue_delete</tt><big>(</big><em>queue</em>, <em>if_unusued=False</em>, <em>if_empty=False</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.queue_delete" title="Permalink to this definition">¶</a></dt> +<dt id="kombu.transport.virtual.Message.serializable"> +<tt class="descclassname">Message.</tt><tt class="descname">serializable</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Message.serializable" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> +</dd></dl> + +</div> +<div class="section" id="quality-of-service"> +<h2><a class="toc-backref" href="#id4">Quality Of Service</a><a class="headerlink" href="#quality-of-service" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="kombu.transport.virtual.QoS"> +<em class="property">class </em><tt class="descclassname">kombu.transport.virtual.</tt><tt class="descname">QoS</tt><big>(</big><em>channel</em>, <em>prefetch_count=0</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.QoS" title="Permalink to this definition">¶</a></dt> +<dd><p>Quality of Service guarantees.</p> +<p>Only supports <cite>prefetch_count</cite> at this point.</p> +<table class="docutils field-list" frame="void" rules="none"> +<col class="field-name" /> +<col class="field-body" /> +<tbody valign="top"> +<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> +<li><strong>channel</strong> – AMQ Channel.</li> +<li><strong>prefetch_count</strong> – Initial prefetch count (defaults to 0).</li> +</ul> +</td> +</tr> +</tbody> +</table> +<dl class="method"> +<dt id="kombu.transport.virtual.QoS.ack"> +<tt class="descname">ack</tt><big>(</big><em>delivery_tag</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.QoS.ack" title="Permalink to this definition">¶</a></dt> +<dd><p>Acknowledge message and remove from transactional state.</p> +</dd></dl> + <dl class="method"> -<dt id="kombu.transport.virtual.Transport.Channel.queue_purge"> -<tt class="descclassname">Transport.Channel.</tt><tt class="descname">queue_purge</tt><big>(</big><em>queue</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.Channel.queue_purge" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.QoS.append"> +<tt class="descname">append</tt><big>(</big><em>message</em>, <em>delivery_tag</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.QoS.append" title="Permalink to this definition">¶</a></dt> +<dd><p>Append message to transactional state.</p> +</dd></dl> +<dl class="method"> +<dt id="kombu.transport.virtual.QoS.can_consume"> +<tt class="descname">can_consume</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.QoS.can_consume" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns true if the channel can be consumed from.</p> +<p>Used to ensure the client adhers to currently active +prefetch limits.</p> </dd></dl> <dl class="attribute"> -<dt id="kombu.transport.virtual.Transport.Cycle"> -<tt class="descclassname">Transport.</tt><tt class="descname">Cycle</tt><a class="headerlink" href="#kombu.transport.virtual.Transport.Cycle" title="Permalink to this definition">¶</a></dt> -<dd><p>alias of <a class="reference internal" href="#kombu.transport.virtual.FairCycle" title="kombu.transport.virtual.FairCycle"><tt class="xref py py-class docutils literal"><span class="pre">FairCycle</span></tt></a></p> +<dt id="kombu.transport.virtual.QoS.prefetch_count"> +<tt class="descname">prefetch_count</tt><a class="headerlink" href="#kombu.transport.virtual.QoS.prefetch_count" title="Permalink to this definition">¶</a></dt> +<dd><p>current prefetch count value</p> </dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Transport.close_channel"> -<tt class="descclassname">Transport.</tt><tt class="descname">close_channel</tt><big>(</big><em>channel</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.close_channel" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.QoS.reject"> +<tt class="descname">reject</tt><big>(</big><em>delivery_tag</em>, <em>requeue=False</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.QoS.reject" title="Permalink to this definition">¶</a></dt> +<dd><p>Remove from transactional state and requeue message.</p> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Transport.close_connection"> -<tt class="descclassname">Transport.</tt><tt class="descname">close_connection</tt><big>(</big><em>connection</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.close_connection" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.QoS.restore_unacked"> +<tt class="descname">restore_unacked</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.QoS.restore_unacked" title="Permalink to this definition">¶</a></dt> +<dd><p>Restore all unacknowledged messages.</p> +</dd></dl> <dl class="method"> -<dt id="kombu.transport.virtual.Transport.create_channel"> -<tt class="descclassname">Transport.</tt><tt class="descname">create_channel</tt><big>(</big><em>connection</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.create_channel" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +<dt id="kombu.transport.virtual.QoS.restore_unacked_once"> +<tt class="descname">restore_unacked_once</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.QoS.restore_unacked_once" title="Permalink to this definition">¶</a></dt> +<dd><p>Restores all uncknowledged message at shutdown/gc collect.</p> +<p>Will only be done once for each instance.</p> +</dd></dl> -<dl class="method"> -<dt id="kombu.transport.virtual.Transport.drain_events"> -<tt class="descclassname">Transport.</tt><tt class="descname">drain_events</tt><big>(</big><em>connection</em>, <em>timeout=None</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.drain_events" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +</dd></dl> -<dl class="method"> -<dt id="kombu.transport.virtual.Transport.establish_connection"> -<tt class="descclassname">Transport.</tt><tt class="descname">establish_connection</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.transport.virtual.Transport.establish_connection" title="Permalink to this definition">¶</a></dt> -<dd></dd></dl> +</div> +<div class="section" id="in-memory-state"> +<h2><a class="toc-backref" href="#id5">In-memory State</a><a class="headerlink" href="#in-memory-state" title="Permalink to this headline">¶</a></h2> +<dl class="class"> +<dt id="kombu.transport.virtual.BrokerState"> +<em class="property">class </em><tt class="descclassname">kombu.transport.virtual.</tt><tt class="descname">BrokerState</tt><big>(</big><em>exchanges=None</em>, <em>bindings=None</em><big>)</big><a class="headerlink" href="#kombu.transport.virtual.BrokerState" title="Permalink to this definition">¶</a></dt> +<dd><dl class="attribute"> +<dt id="kombu.transport.virtual.BrokerState.bindings"> +<tt class="descname">bindings</tt><a class="headerlink" href="#kombu.transport.virtual.BrokerState.bindings" title="Permalink to this definition">¶</a></dt> +<dd><p>active bindings.</p> +</dd></dl> + +<dl class="attribute"> +<dt id="kombu.transport.virtual.BrokerState.exchanges"> +<tt class="descname">exchanges</tt><a class="headerlink" href="#kombu.transport.virtual.BrokerState.exchanges" title="Permalink to this definition">¶</a></dt> +<dd><p>exchange declarations.</p> +</dd></dl> </dd></dl> </div> +</div> </div> @@ -387,12 +557,24 @@ an equal chance to be consumed from.</p> <div class="sphinxsidebarwrapper"><p class="logo"><a href="../index.html"> <img class="logo" width="128" height="128" src="http://cloud.github.com/downloads/ask/kombu/kombusmall.jpg" alt="Logo"/> </a></p> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#">kombu.transport.virtual</a><ul> +<li><a class="reference internal" href="#transports">Transports</a></li> +<li><a class="reference internal" href="#channel">Channel</a></li> +<li><a class="reference internal" href="#message">Message</a></li> +<li><a class="reference internal" href="#quality-of-service">Quality Of Service</a></li> +<li><a class="reference internal" href="#in-memory-state">In-memory State</a></li> +</ul> +</li> +</ul> + <h4>Previous topic</h4> <p class="topless"><a href="kombu.transport.base.html" - title="previous chapter">Base Transport Interface - kombu.transport.base</a></p> + title="previous chapter">kombu.transport.base</a></p> <h4>Next topic</h4> - <p class="topless"><a href="kombu.serialization.html" - title="next chapter">Serialization - kombu.serialization</a></p> + <p class="topless"><a href="kombu.transport.virtual.exchange.html" + title="next chapter">kombu.transport.virtual.exchange</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../sources/reference/kombu.transport.virtual.txt" @@ -425,18 +607,18 @@ an equal chance to be consumed from.</p> <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.serialization.html" title="Serialization - kombu.serialization" + <a href="kombu.transport.virtual.exchange.html" title="kombu.transport.virtual.exchange" >next</a> |</li> <li class="right" > - <a href="kombu.transport.base.html" title="Base Transport Interface - kombu.transport.base" + <a href="kombu.transport.base.html" title="kombu.transport.base" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.utils.functional.html b/reference/kombu.utils.functional.html index 30b86c4e..40fe1f90 100644 --- a/reference/kombu.utils.functional.html +++ b/reference/kombu.utils.functional.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>functools - kombu.utils.functional — Kombu v0.9.0 documentation</title> + <title>kombu.utils.functional — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,7 +21,7 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> <link rel="next" title="Change history" href="../changelog.html" /> <link rel="prev" title="Utilities - kombu.utils" href="kombu.utils.html" /> @@ -42,7 +42,7 @@ <li class="right" > <a href="kombu.utils.html" title="Utilities - kombu.utils" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -52,8 +52,8 @@ <div class="bodywrapper"> <div class="body"> - <div class="section" id="functools-kombu-utils-functional"> -<h1>functools - kombu.utils.functional<a class="headerlink" href="#functools-kombu-utils-functional" title="Permalink to this headline">¶</a></h1> + <div class="section" id="kombu-utils-functional"> +<h1>kombu.utils.functional<a class="headerlink" href="#kombu-utils-functional" title="Permalink to this headline">¶</a></h1> <span class="target" id="module-kombu.utils.functional"></span><p>Functional utilities for Python 2.4 compatibility.</p> </div> @@ -108,13 +108,13 @@ <li class="right" > <a href="kombu.utils.html" title="Utilities - kombu.utils" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file diff --git a/reference/kombu.utils.html b/reference/kombu.utils.html index d9ac96ab..90a602ba 100644 --- a/reference/kombu.utils.html +++ b/reference/kombu.utils.html @@ -6,13 +6,13 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>Utilities - kombu.utils — Kombu v0.9.0 documentation</title> + <title>Utilities - kombu.utils — Kombu v0.9.1 documentation</title> <link rel="stylesheet" href="../static/celery.css" type="text/css" /> <link rel="stylesheet" href="../static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', - VERSION: '0.9.0', + VERSION: '0.9.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true @@ -21,10 +21,10 @@ <script type="text/javascript" src="../static/jquery.js"></script> <script type="text/javascript" src="../static/underscore.js"></script> <script type="text/javascript" src="../static/doctools.js"></script> - <link rel="top" title="Kombu v0.9.0 documentation" href="../index.html" /> + <link rel="top" title="Kombu v0.9.1 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="index.html" /> - <link rel="next" title="functools - kombu.utils.functional" href="kombu.utils.functional.html" /> - <link rel="prev" title="Object Utilities - kombu.abstract" href="kombu.abstract.html" /> + <link rel="next" title="kombu.utils.functional" href="kombu.utils.functional.html" /> + <link rel="prev" title="kombu.compression" href="kombu.abstract.html" /> </head> <body> <div class="related"> @@ -37,12 +37,12 @@ <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.utils.functional.html" title="functools - kombu.utils.functional" + <a href="kombu.utils.functional.html" title="kombu.utils.functional" accesskey="N">next</a> |</li> <li class="right" > - <a href="kombu.abstract.html" title="Object Utilities - kombu.abstract" + <a href="kombu.abstract.html" title="kombu.compression" accesskey="P">previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" accesskey="U">API Reference</a> »</li> </ul> </div> @@ -134,6 +134,11 @@ order if false.</p> </dd></dl> <dl class="function"> +<dt id="kombu.utils.emergency_dump_state"> +<tt class="descclassname">kombu.utils.</tt><tt class="descname">emergency_dump_state</tt><big>(</big><em>state</em><big>)</big><a class="headerlink" href="#kombu.utils.emergency_dump_state" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + +<dl class="function"> <dt id="kombu.utils.gen_unique_id"> <tt class="descclassname">kombu.utils.</tt><tt class="descname">gen_unique_id</tt><big>(</big><big>)</big><a class="headerlink" href="#kombu.utils.gen_unique_id" title="Permalink to this definition">¶</a></dt> <dd><p>Generate a unique id, having - hopefully - a very small chance of @@ -207,6 +212,11 @@ retry.</li> <tt class="descclassname">kombu.utils.</tt><tt class="descname">rpartition</tt><big>(</big><em>S</em>, <em>sep</em><big>)</big><a class="headerlink" href="#kombu.utils.rpartition" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> +<dl class="function"> +<dt id="kombu.utils.say"> +<tt class="descclassname">kombu.utils.</tt><tt class="descname">say</tt><big>(</big><em>m</em>, <em>*s</em><big>)</big><a class="headerlink" href="#kombu.utils.say" title="Permalink to this definition">¶</a></dt> +<dd></dd></dl> + </div> @@ -219,10 +229,10 @@ retry.</li> </a></p> <h4>Previous topic</h4> <p class="topless"><a href="kombu.abstract.html" - title="previous chapter">Object Utilities - kombu.abstract</a></p> + title="previous chapter">kombu.compression</a></p> <h4>Next topic</h4> <p class="topless"><a href="kombu.utils.functional.html" - title="next chapter">functools - kombu.utils.functional</a></p> + title="next chapter">kombu.utils.functional</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../sources/reference/kombu.utils.txt" @@ -255,18 +265,18 @@ retry.</li> <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > - <a href="kombu.utils.functional.html" title="functools - kombu.utils.functional" + <a href="kombu.utils.functional.html" title="kombu.utils.functional" >next</a> |</li> <li class="right" > - <a href="kombu.abstract.html" title="Object Utilities - kombu.abstract" + <a href="kombu.abstract.html" title="kombu.compression" >previous</a> |</li> - <li><a href="../index.html">Kombu v0.9.0 documentation</a> »</li> + <li><a href="../index.html">Kombu v0.9.1 documentation</a> »</li> <li><a href="index.html" >API Reference</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2010, Ask Solem. - Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1. + Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4. </div> </body> </html>
\ No newline at end of file |