Skip to content

Added message bus for communcation between instances

Marius Kriegerowski requested to merge feature/publish-subscribe into master

A very simple implementation of a publisher subscriber model. As hbmqtt is not fully supporting python3.7 and higher, yet, I took a dive into pika which turns out to also offers asyncio support: https://pika.readthedocs.io/en/stable/examples/asynchronous_consumer_example.html

The base.py serves as an abstraction class, simple.py implements a very simple pub-sub model basically just to test if the abstraction made sense and mqtt.py implements the actual IPC pub-sub model using pika (draft).

After our discussion I feel that this is much more lightweight and will be enough to broadcast signals between processes, which is enough to address point 2) discussed here https://git.gfz-potsdam.de/dynamicexposure/rabotnik/rabotnik/-/issues/27#note_43954

what do you think @ds @fd?

Edited by Felix Delattre

Merge request reports