saver.mq_listeners package¶
saver.mq_listeners.rabbit_listener module¶
-
saver.mq_listeners.rabbit_listener.run_rabbit(host, port, saver)¶ A function that initalizes the saver service that listens to a RabbitMQ server. Listens to the ‘saver’ queue for ‘save.*’ topic by default, and upon receiving message saved the field (*) into the appropriate snapshot in the DB
- Parameters
host – The host of the RabbitMQ server
port – The port of the RabbitMQ server
saver – An instance of the Saver class connecting to the appropriate DB
Module contents¶
This package stores all the listener functions that connect to different MQs when running the saver as a service Supports RabbitMQ by default, additional listeners can be added using the @listener decorator
-
saver.mq_listeners.listener(scheme)¶ A decorator used to denote a function or a callable class that serves as a listener to a MQ server. By default, a function or callable class is passed host, port and an instance of the Saver class as arguments
- Parameters
scheme – The scheme of the MQ server which the listener connects to