Skip to content
Snippets Groups Projects
Commit cb676217 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

docs fix

parent 97cdb398
No related branches found
No related tags found
No related merge requests found
Pipeline #63906 passed with stages
in 2 minutes and 25 seconds
CoolAMQP cluster reference
CoolAMQP classes reference
==========================
Cluster-related things
----------------------
.. autoclass:: coolamqp.clustering.Cluster
:members:
.. note:: If environment variable :code:`COOLAMQP_FORCE_SELECT_LISTENER` is defined, select will be used instead of epoll.
Publisher
---------
.. autoclass:: coolamqp.attaches.publisher.Publisher
:members:
:undoc-members:
Consumers
---------
.. autoclass:: coolamqp.attaches.consumer.BodyReceiveMode
:members:
......@@ -26,4 +20,22 @@ Consumers
Please note that :meth:`coolamqp.clustering.Cluster.consume` passes lot of it's
args and kwargs directly to the :class:`coolamqp.attaches.consumer.Consumer`.
Extra objects
-------------
.. class:: coolamqp.objects.Message
:members:
.. class:: coolamqp.objects.ReceivedMessage
:members:
.. class:: coolamqp.objects.MessageProperties
:members:
.. class:: coolamqp.objects.Queue
:members:
.. class:: coolamqp.objects.Exchange
:members:
......@@ -103,4 +103,20 @@ And let's try to send something to this exchange:
from coolamqp.objects import Message
c.publish(Message(b'my bag of bytes'), exchange=xchg, confirm=True).result()
And voila, we're done here!
\ No newline at end of file
And voila, we're done here!
Topic exchanges
---------------
Topic exchanges are a bit harder. Let's try them:
.. code-block:: python
from coolamqp.cluster import Cluster
from coolamqp.objects import NodeDefinition, Exchange
nd = NodeDefinition('amqp://127.0.0.1:5672/vhost', user='test', password='test', heartbeat=30)
c = Cluster(nd)
c.start()
xchg = Exchange('my-exchange', type='topic')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment