kafka
Platypush documentation
kafka
- class platypush.backend.kafka.KafkaBackend(server='localhost:9092', topic='platypush', **kwargs)[source]
Bases:
Backend
Backend to interact with an Apache Kafka (https://kafka.apache.org/) streaming platform, send and receive messages.
Requires:
kafka (
pip install kafka-python
)
- run()[source]
Starts the backend thread. To be implemented in the derived classes if the loop method isn’t defined.
- send_message(msg, **kwargs)[source]
Sends a platypush.message.Message to a node. To be implemented in the derived classes. By default, if the Redis backend is configured then it will try to deliver the message to other consumers through the configured Redis main queue.
- Parameters:
msg – The message to send
queue_name – Send the message on a specific queue (default: the queue_name configured on the Redis backend)