Skip to content

Commit f36fa88

Browse files
Updated documentation on message queue manager classes
1 parent 36d1785 commit f36fa88

File tree

2 files changed

+34
-5
lines changed

2 files changed

+34
-5
lines changed

docs/api.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ API Reference
108108
.. autoclass:: RedisManager
109109
:members:
110110

111+
``KafkaManager`` class
112+
----------------------
113+
114+
.. autoclass:: KafkaManager
115+
:members:
116+
111117
``AsyncManager`` class
112118
----------------------
113119

@@ -120,3 +126,9 @@ API Reference
120126

121127
.. autoclass:: AsyncRedisManager
122128
:members:
129+
130+
``AsyncAioPikaManager`` class
131+
---------------------------
132+
133+
.. autoclass:: AsyncAioPikaManager
134+
:members:

docs/server.rst

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -517,20 +517,37 @@ the correct URL for a given message queue.
517517
Note that Kombu currently does not support asyncio, so it cannot be used with
518518
the :class:`socketio.AsyncServer` class.
519519

520+
Kafka
521+
~~~~~
522+
523+
`Apache Kafka <https://kafka.apache.org/>`_ is supported through the
524+
`kafka-python <https://kafka-python.readthedocs.io/en/master/index.html>`_
525+
package::
526+
527+
pip install kafka-python
528+
529+
Access to Kafka is configured through the :class:`socketio.KafkaManager`
530+
class::
531+
532+
mgr = socketio.KafkaManager('kafka://')
533+
sio = socketio.Server(client_manager=mgr)
534+
535+
Note that Kafka currently does not support asyncio, so it cannot be used with
536+
the :class:`socketio.AsyncServer` class.
537+
520538
AioPika
521539
~~~~~~~
522540

523-
If you want to combine a RabbitMQ based manager with asyncio and a
524-
:class:`socketio.AsyncServer` class, you can use the
525-
`AioPika <https://aio-pika.readthedocs.io/en/latest/>`_ based manager.
541+
A RabbitMQ message queue is supported in asyncio applications through the
542+
`AioPika <https://aio-pika.readthedocs.io/en/latest/>`_ package::
526543
You need to install aio_pika with pip::
527544

528545
pip install aio_pika
529546

530547
The RabbitMQ queue is configured through the
531-
:class:`socketio.AsyncPubSubAioPikaManager`::
548+
:class:`socketio.AsyncAioPikaManager` class::
532549

533-
mgr = socketio.AsyncPubSubAioPikaManager('amqp://')
550+
mgr = socketio.AsyncAioPikaManager('amqp://')
534551
sio = socketio.AsyncServer(client_manager=mgr)
535552

536553
Emitting from external processes

0 commit comments

Comments
 (0)