pymessagebus
pymessagebus copied to clipboard
A MessageBus / CommandBus light implementation for Python. Simple pattern that allows a clean decoupling in projects of any size! :-)
During the handling of a message, if an exception is raised, `_is_processing_a_message` is not reset to `False`, which can cause issues with subsequent message handling. This PR introduces a `try/finally`...
I'm trying to use *MessageBus* in multi-threaded program where one thread (e.g. *Button*) sends a `ButtonMessage()` to the bus. Then I've got a *Controller* thread that's subscribed to the `ButtonMessage()`...
In the singleton messagebus and commandbus provided by default, are exposed the method `add_handler`, `handle` and `has_handler_for`. It would be convenient to expose the method `remove_handler` as well.
Hi there! Just wondering, is async support planned?